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

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

Answer: d

Join The Discussion