Question

Consider the following C++ program, where &i means i is passed byreference: (a) What is the value of sum at the end of the function fool? Brieflyexplain why. (b) What

is the value of sum at the end of the function foo2? Brieflyexplain why.

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5