#include<stdlib.h> #include<memory.h> #include<string.h> #include<stdio.h> int func(void) { staticint i =0; return++i; } int a =0; char*p1; int main() { int b ; char s[]="abc"; char*p2; char*p3 ="123456"; staticint c =0; p1 = (char*)malloc(10); p2 = (char*)malloc(20); int*p =&a; p =&b; p =&c; strcpy(p1,"123456"); int i; i = func(); i= func(); printf("%d\n",i); return0; } //使用VC內存察看來觀察