What would the output of c program


int main()
    static int i=5;
        printf("%d ",i);
Asked on January 30, 2020 in program.
Add Comment
1 Answer(s)

Output: 0 0 0 0


Since i is a static variable and is stored in Data Section, all calls to main share same i.

Answered on January 30, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.