Question PRG-C-0075
HardWhat is the output of this program?
#include <stdio.h>
int tick(void) { static int t = 0; return ++t; }
int main() {
int a = tick();
int b = tick();
int c = tick();
printf("%d %d %d", a, b, c);
return 0;
}
- A.
0 1 2
- B.
1 2 3
- C.
Sign up free to see the answer and a step-by-step explanation.