Q. 65 Consider the C program below.
#include <stdio.h> int *A, stkTop; int stkFunc (int opcode, int val) { static int size=, stkTop=; switch (opcode) { case -1: size = val; break; case : if (stkTop < size ) A[stkTop++]=val; break; default: if (stkTop) return A[--stkTop]; } return -1; } int main() { int B[20]; A=B; stkTop = -1; stkFunc (-1, 10); stkFunc (, 5); stkFunc (, 10); printf ("%d\n", stkFunc(1, )+ stkFunc(1, )); }
The value printed by the above program is ___________
(A) 9
(B) 10
(C) 15
(D) 17
Answer: (C)
Explanation: