Answer:
The display will be 17.
Explanation:
Tracing through the program:
At first, math is called and sent 1 and 2 - so 1 is stored to ans1 and 2 is stored to ans2.
If the user inputs 3 for a and 4 for b, the program then calls function math2 and passed values of 3 and 4.
So now inside of math2, 3 is stored to res1 and 4 is stored to res3. Inside of this function, res1 and res2 are added together - so then 7 is stored to d and then returned back to the original function.
So now 7 was stored back to the variable c. Then a and ans1 are added together (3 + 1 = 4) and b and ans2 are added together (4 + 2 = 6). Each of these values are stored back to e and f.
Then those values, e and f (4 and 6) are again sent to math2, which simply adds the values together and returns it back to the function. So 10 is sent back to math and stored to the value of g.
Then c (7) and g (10) are added together and displayed.