adplus-dvertising
frame-decoration

Question

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

a.

10

b.

Compile time error

c.

Undefined behaviour

d.

11

Posted under C Programming

Answer: (b).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 auto int i = 10; i = 11; printf("%d\n", i); }