C语言学习 - 0003 static验证

时间:2015-11-17 18:42:54   收藏:0   阅读:249
 1 #include<stdio.h>
 2 void main()
 3 {
 4     int testofstatic();
 5     int a=0;
 6     a=testofstatic();
 7     printf("%d\n",a);
 8     a=testofstatic();
 9     printf("%d",a);
10     getchar();
11 }
12 
13 int testofstatic()
14 {
15     static int a=20;
16     a++;
17     return(a);
18 }

 

原文:http://www.cnblogs.com/Yx37412/p/4972278.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!