Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- void func(void){
- static int val=0;
- printf("count=%d\n",val);
- val++;
- }
- int main(void){
- int i;
- for(i=0;i<10;i++){
- func();
- }
- }
- /*
- count=0
- count=1
- count=2
- count=3
- count=4
- count=5
- count=6
- count=7
- count=8
- count=9
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement