Which of the following is the Output of this program? #include <stdio.h> int main() { static int i=5; if (--i){ printf("%d ",i); main(); } }

Which of the following is the Output of this program?

#include <stdio.h>
int main() {
    static int i=5;
    if (--i){
        printf("%d ",i);
        main();
    }
}
  1. a) 4 3 2 1
  2. b) 1 2 3 4
  3. c) 4 4 4 4
  4. d) 0 0 0 0

From the Combined Bank Assistant Programmer (CSE) February 2024 – Written (BIBM) exam, question 37 of 41.

More from this paper