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>
int main()
{
printf(“Hello World! %d \n”, x);
return 0;
}

What will be the output of the following C code?
#include <stdio.h>
int main()
{
printf(“Hello World! %d \n”, x);
return 0;
}
a) Hello World! x;
b) Compile time error
c) Hello World!
d) Hello World! followed by a junk value

Answer: b
Explanation: It results in an error since x is used without declaring the variable x.

Join The Discussion