Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = 3;
int b = ++a + a++ + –a;
printf(“Value of b is %d”, b);
}

What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = 3;
int b = ++a + a++ + –a;
printf(“Value of b is %d”, b);
}
a) Value of x is 12
b) Value of x is 13
c) Value of x is 10
d) Undefined behaviour

Answer: d

Join The Discussion