UGC NET CS 2014 Dec-Paper-2
May 22, 2024Question 4807 – UGC NET CS 2014 Dec-Paper-2
May 22, 2024Question 4806 – UGC NET CS 2014 Dec-Paper-2
What will be the output of the following ‘C’ code ?
main( )
{
int x=128;
printf (“\n%d”, 1 + x++);
}
Correct Answer: B
Question 11 Explanation:
In this program we are using post increment. Post increment will send the value before updating the value.
printf(“\n%d”, 1 + x++); /* x=128 */
Here, 1+128=129
printf(“\n%d”, 1 + x++); /* x=128 */
Here, 1+128=129
128
129
130
131
Subscribe
Login
0 Comments