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

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

Answer: b

Join The Discussion