adplus-dvertising
frame-decoration

Question

What is the output of this C code?
#include <stdio.h>
    int main()
    {
        register int i = 10;
        int *p = &i;
        *p = 11;
        printf("%d %d\n", i, *p);
    }

a.

Depends on whether i is actually stored in machine register

b.

10 10

c.

11 11

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> int main() { register int i = 10; int *p = &i; *p = 11; printf("%d %d\n",...