diff --git a/C/static_type.c b/C/static_type.c new file mode 100644 index 0000000..e5662a4 --- /dev/null +++ b/C/static_type.c @@ -0,0 +1,18 @@ +//static example + +#include + +void stat(void); + +void main ( ) +{ + int i; + for(i=1; i<=3; i++) + stat( ); +} +void stat(void) +{ + static int x = 0; + x = x+1; + printf("x = %d\n", x); +} \ No newline at end of file