What will be the output of the following C code?
#include <stdio.h>
void main()
{
register int x = 5;
m();
printf("x is %d", x);
}
void m()
{
x++;
}
#include <stdio.h>
void main()
{
register int x = 5;
m();
printf("x is %d", x);
}
void m()
{
x++;
}A. 6
B. 5
C. Junk value
D. Compile time error
Answer: Option D

Join The Discussion