Question 51
Consider a function returning a value: 'int calc(int a) { static int s = 51; s += a; return s; }'. What is returned by calling calc(5) twice consecutively?
Detailed Solution
Static local variable 's' retains its updated value across consecutive function calls.