/*cbr.cpp 'Call-by-Reference' program. *This program illustrates the role of call by reference and * the scope of variables. */ #include using namespace std; /* Next, we have a call-by-reference formal parameters * are holding spaces for the actual arguments in a function call. * A formal parameter is made a call by reference parameter by appending the * '&' after its typename and the vartiable that follows should be a non-constant. * Upon a call for get_numbers, the corresponding variable argument and not its value will be substituted * for the formal parameter. * Any change made to the formal parameter will be made to the argument varaible when the function is called. */ void get_numbers(int& input1, int& input2) { cout<< "Enter the two integers: "<> input1 >> input2 ; /*When instructions in the body of this function are executed, * the changes to the function body are implemented for example * at memory 101a, value stored is now input1. */ } void swap_values(int& variable1, int& variable2) { int temp ; temp = variable1; variable1= variable2 ; variable2 = temp; } void show_results(int output1, int output2) { cout<< "In reverse order the numbers are: " <