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

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

Answer: a

Join The Discussion