📅  最后修改于: 2022-03-11 15:04:38.844000             🧑  作者: Mango
#include
#include
char* createStr(){
static char str[20] = "my";
return str;
}
int main(){
char a[20];
strcpy(a,createStr()); //this will copy the returned value of createStr() into a[]
printf("%s",a);
return 0;
}