What will be the output of the following C code? #include<stdio.h> int main(){ register static int i = 10; i = 11; printf("%d\n", i); return 0; }

What will be the output of the following C code?

#include<stdio.h>
int main(){
    register static int i = 10;
    i = 11;
    printf("%d\n", i);
    return 0;
}
  1. a) 10
  2. b) Compile-time error
  3. c) Undefined behavior
  4. d) 11

From the BUET MSC (ICT) July 2021 – MCQ exam, question 16 of 57.

More from this paper