Home » C Programming » Storage Classes » Question
  1. What will be the output of the program:-
    extern int i = 5;
    main()
    (
    int i=7;
    printf("%d",i);
    }
    
    1. 5
    2. compiler error
    3. 7
    4. garbage value
Correct Option: C

printf function prints value of i, which is local to the function in which it is declared.



Your comments will be displayed only after manual approval.