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()
{
register int x = 5;
m();
printf(“x is %d”, x);
}
void m()
{
x++;
}

What will be the output of the following C code?
#include < stdio.h >
void main()
{
register int x = 5;
m();
printf(“x is %d”, x);
}
void m()
{
x++;
}
a) 6
b) 5
c) Junk value
d) Compile time error

Answer: d

Join The Discussion