经典笔试题:动态内存分配,详解

题1:程序员 void fun(char *p) { p = (char *)malloc(100); } int main() { char *str = NULL; fun(str); strcpy(str,"hello world"); system("pause"); return 0; } 请问运行结果是什么? 答:程序运行崩溃web
相关文章
相关标签/搜索