void GetMemory(char *p) { p = (char *)malloc(100); } void Test(void) { char *str = NULL; GetMemory(str); strcpy(str, "hello world"); printf(str); }
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题