C statische Variablen
#include<stdio.h>
int fun()
{
static int count = 0;
count++;
return count;
}
int main()
{
printf("%d ", fun()); // prints 1
printf("%d ", fun()); // prints 2
return 0;
}
Dark Dugong