#include <stdio.h>
int a;
void func(void){
static int b = 0;
int c = 0;
printf("a = %d, b = %d, c = %d \n", ++a
,++b
,++c
); }
int main(void) {
func();
func();
func();
func();
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBhOwoKdm9pZCBmdW5jKHZvaWQpewogICAgc3RhdGljIGludCBiID0gMDsKICAgIGludCBjID0gMDsKICAgIHByaW50ZigiYSA9ICVkLCBiID0gJWQsIGMgPSAlZCBcbiIsICsrYSwrK2IsKytjKTsKfQoKaW50IG1haW4odm9pZCkgewogICAgZnVuYygpOwogICAgZnVuYygpOwogICAgZnVuYygpOwogICAgZnVuYygpOwoJcmV0dXJuIDA7Cn0K
a = 1, b = 1, c = 1
a = 2, b = 2, c = 1
a = 3, b = 3, c = 1
a = 4, b = 4, c = 1