adplus-dvertising
frame-decoration

Question

What is the output of this C code?
#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

Posted under Functions C Programming

Answer: (d).Compile time error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this C code? #include <stdio.h> void main() { register int x = 5; m(); printf("x is %d", x); } void...