TGPSC HMWSSB Manager 2015 Paper 2 CSE · Question 115
Question 115 of the TSPSC Manager (Engineering), HMWSSB, 2015: Paper 2 (Computer Science & Information Technology) (1 November 2015). Try it first, then open the answer. The explanation is in the practice app with the All-in-One Pass.
Consider the following C program
int x; main() { int x=0; { int x=10; x++; change_x(x); x++; modify_x(); printf("%d ",x); } x++; change_x(x); printf("%d ",x); modify_x(); printf("%d\n",x); } modify_x() { return (x+=10); } change_x() { return(x+=1); }What would be the output of the above program?
- 23 14 24
- 23 1 1
- 13 1 1
- 12 1 1
Show answer
Answer: (4) 12 1 1
Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.