p是局部变量
这样也可:#include<stdio.h>char p[] = "hello world"; char *GetMemory(void){//char p[] = "hello world"; return p;}void Test(void){char *str = NULL;str = GetMemory(); printf("%s",str);}
int main(){ Test(); return 0;}