What will be the output of the following code?
#include <stdio.h>
void demo() {
static int count = 0;
count++;
printf("%d ", count);
}
int main() {
demo();
demo();
demo();
return 0;
}
1 1 1
1 2 3
0 1 2
2 3 4
This question is part of this quiz :
Storage Classes and Type Qualifiers in C