程序功能:动态分配内存,将分配的内存地址输出.

2024-12-25 08:41:59
推荐回答(1个)
回答1:

char pch[2];改为char *pch;
if (pch = (char *)malloc(100) == NULL)改为if ((pch = (char *)malloc(100))== NULL)
close(pch);改为free(pch);