一道c++题

来源:互联网 发布:r读取sas数据 编辑:程序博客网 时间:2024/05/19 17:50

void Test(void){
char *str = (char *) malloc(100);
strcpy(str, “hello”);
free(str);
if(str != NULL){
strcpy(str, “world”);
printf(str);
}
}

 

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

原创粉丝点击