void Test(void){ char *str = (char *) malloc(100); strcpy(str, “hello”); free(str); if(str != NULL){ strcpy(str, “world”); printf(str); } } 答:测试后能输出“world” 请问下内存应该被释放掉了,怎么还能输出world。
free(str); str=NULL;
69,371
社区成员
243,080
社区内容
加载中
试试用AI创作助手写篇文章吧