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);
}
#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: Option A

Join The Discussion