#include <stdio.h>
/* function declaration */
void func(void);
static int count = 5; /* global variable */
main() {
while(count--) {
func();
}
return 0;
}
/* function definition */
void func( void ) {
static int i = 5; /* local static variable */
i++;
printf("i is %d and count is %d/n", i, count);
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265113.html