内存存储区
代码:
点击查看代码
#include <stdio.h>
int* func1()
{
//int a = 0; // 直接报错
static int a = 0;
a++;
return &a;
}
int func2()
{
//int a = 0;
static int a = 0;
a++;
return a;
}
int main()
{
int i;
int *p;
/* Write C code in this online editor and run it. */
printf("Hello, World! \n");
p=func1();
*p = 10;
for(i=0; i<5; i++)
{
p= func1();
printf("func1 run ret is %d \n", *p);
printf("func2 run ret is %d \n", func2());
}
return 0;
}
如果,感到此时的自己很辛苦,那告诉自己:容易走的都是下坡路。坚持住,因为你正在走上坡路,走过去,你就一定会有进步。如果,你正在埋怨命运不眷顾,开导自己:命,是失败者的借口;运,是成功者的谦词。命运从来都是掌握在自己的手中,埋怨,只是一种懦弱的表现;努力,才是人生的态度。


浙公网安备 33010602011771号