Multiple choice

What would be the output of the following program? #include<stdio.h> #include<conio.h> #include<math.h> int main() { int input(int); int ans(int); int x,y=0; x=ans(++(y=(input(x)))); printf(answer=%d,x); getch(); } int input(int) { int k=7;

return k; } int ans(int m) { return(pow(m,2)); }

  1. answer = 49

  2. answer = 36

  3. answer = 64

  4. error in the program

  5. none of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Program will first increment the value and then find the square of incremented value. So, answer will be 7 ++ = 8 * 8 = 64 Hence, option (3) is correct.