Question: Consider the following function implementation: void myclass::ref_addition (int a, int b, int& sum) { sum = a+b; } The main function might have code that
Consider the following function implementation: void myclass::ref_addition (int a, int b, int& sum) { sum = a+b; }
The main function might have code that looks like this: myclass foo; int num1 = 1; int num2 = 2; int total = 0; foo.ref_addition(num1, num2, total);
When this code completes, what will the value in the total variable be? Provide the integer value in the box below.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
