Created
September 11, 2012 01:02
-
-
Save kelvin-fly/3695201 to your computer and use it in GitHub Desktop.
the area of variable and static
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| void foo(void); | |
| int b = 666; | |
| int main() | |
| { | |
| foo(); | |
| foo(); | |
| printf("what!!\n"); | |
| foo(); | |
| return 0; | |
| } | |
| void foo(void) | |
| { | |
| static int i; | |
| // int i; | |
| printf("%d\n",i); | |
| i = 777; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment