请教大家一个问题,在下实在不懂
char *str=(char *)malloc(100);
char str1[]="hello world";
free(str);
if(str!=NULL)
{
strcpy(str,str1);
}
printf("%s\n",str);
程序最后会输出什么? 请写出答案,并说明理由!
char *str=(char *)malloc(100);
char str1[]="hello world";
free(str);
if(str!=NULL)
{
strcpy(str,str1);
}
printf("%s\n",str);
程序最后会输出什么? 请写出答案,并说明理由!
2006-04-14 19:19
2006-04-15 11:47
书上没有啊
还是解答一下吧
2006-04-15 12:14
2006-04-15 12:50

2006-04-15 12:57
2006-04-15 13:09
2006-04-15 14:57

2006-04-16 01:59
2006-04-16 13:23