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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!