Consider the following program segment when answering the next 5 questions: void prod (int, int, int&); void main () { int a = 1, b = 2, c; prod(a, b, c); prod(c, b, a); prod(c, a, b) } void prod (int w, int x, int& y) { y = w * x; } (1) What is the final value of a? (2) What is the final value of b? (3) What is the final value of c? (4) Can you insert the following statement at the end of main? Explain? prod(c, c, c); (5) Can you insert the following statement at the end of main? Explain? prod(w, x, y); Consider the following recursive function when answering the next 5 questions: int mystery (int m, int n) { if (m == 1) return n; else return n + mystery (m-1, n); } (6) For the call mystery (4, 5), how many times will the function mystery call itself (not counting the initial call). (7) Draw a table that shows the values of m and n for each call. (8) Show the values returned from each call including the initial call. (9) Write a function with a loop that returns the same result as mystery. (10) Write a function without a loop that returns the same result as mystery. S.C. 2, p. 293, S.C. 3, p. 297 P.E. 1, p. 297 P.E. 1, p. 307 S.C. 1, p. 309 P.E. 1 & 2, p. 309 S.C. 1, p. 316 Q.C. p. 319 R.Q. 1, 2, 4, 5, p. 320 Chapter 9 S.C. #2, p. 416 S.C. #4, p. 422 P.E. 1 & 2, p.422 S.C. 1-3, p. 433 P.E. 1 & 2, p. 433 S.C. 1 - 3, p. 437 S.C. 1, p.441 P.E. 1-3, p. 441 Q.C. p. 445 R.Q. 4, 5, 6, 8, 9, 10