Skip to content
Related Articles

Related Articles

UGC-NET | UGC NET CS 2014 Dec – II | Question 11
  • Last Updated : 25 Jun, 2018

What will be the output of the following ‘C’ code?

main ( )
{
int x = 128;
printf (“\n%d”, 1 + x ++);
}

(A) 128
(B) 129
(C) 130
(D) 131


Answer: (B)

Explanation:

main ( )
{
int x = 128;
printf (“\n%d”, 1 + x ++);
}

In the following C program There is post increment operation:
So, printf will print 1 + 128 as output.
++ will increment the x value i.e. x = 129.
So, option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :