当前位置: 答题翼 > 问答 > 求职面试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

Void GetMemory2(char **p, int num){*p = (char *)malloc(num);}void Test(void){char *str


Void GetMemory2(char **p, int num){*p = (char *)malloc(num);}void

Test(void){char *str = NULL;GetMemory(&str, 100);strcpy(str, "hello"); printf(str); }请问

运行Test 函数会有什么样的结果?

参考答案
您可能感兴趣的试题
  • void setmemory(char **p, int num) { *p=(char *) malloc(num);} void test(void) { ch

  • void setmemory(char **p, int num) { *p=(char *) malloc(num);} void test(void) { ch

  • char*getmemory(void) { char p[]=”hello world”; return p; } void test(void) { char *str

  • void setmemory(char **p, int num) { *p=(char *) malloc(num);}

  • void setmemory(char **p, int num) { *p=(char *) malloc(num);}

  • Void GetMemory2(char **p, int num){*p = (char *)malloc(num);}void Test(void){char *str