一道容易出错的笔试题

来源:岁月联盟 编辑:猪蛋儿 时间:2011-11-18

 

对比下面两个不同程序的输出:

char s[10]="mysohu";

s[0]=0;

printf("%s/n",s)

/

 

char *s="mysohu";

 s[0]=0; //..
 printf("%s/n",s);
/

 

摘自 日新为道的专栏

图片内容