// A static variable is a local variable that keep its value between the function call,
// till the program end. The default value of static variable is 0.
#include <stdio.h>
void f(void);
int main(void)
{
f();
f();
f();
return 0;
}
void f(void)
{
static int n;
n++;
printf("%d\n", n);
}
/*
run:
1
2
3
*/