{ int mount; auto int month; }
{ register int miles; }
#include <stdio.h> / * Function declaration * / void func1 ( void ); static int COUNT = 10 ; / * global variables - static is the default * / int main () { while (count--) { func1 (); } return 0; } void func1(void) { / * 'Thingy' is 'func1' local variables - initialized only once * Each call function 'func1' 'thingy' value is not reset. */ static int thingy=5; thingy++; printf(" thingy 为 %d , count 为 %d\n", thingy, count); }
#include <stdio.h> int count ; extern void write_extern(); int main() { count = 5; write_extern(); }
#include <stdio.h> extern int count; void write_extern(void) { printf("count is %d\n", count); }