modernc.org/ccgo/v3@v3.16.14/lib/testdata/tcc-0.9.27/tests/tests2/51_static.c (about) 1 #include <stdio.h> 2 3 static int fred = 1234; 4 static int joe; 5 6 void henry() 7 { 8 static int fred = 4567; 9 10 printf("%d\n", fred); 11 fred++; 12 } 13 14 int main() 15 { 16 printf("%d\n", fred); 17 henry(); 18 henry(); 19 henry(); 20 henry(); 21 printf("%d\n", fred); 22 fred = 8901; 23 joe = 2345; 24 printf("%d\n", fred); 25 printf("%d\n", joe); 26 27 return 0; 28 } 29 30 /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/