char s[]="abcdef";s[3]='\0';当中是s[3]='\0'怎么解释啊
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/27 02:56:34
![char s[]=](/uploads/image/z/5208997-13-7.jpg?t=char+s%5B%5D%3D%22abcdef%22%3Bs%5B3%5D%3D%27%5C0%27%3B%E5%BD%93%E4%B8%AD%E6%98%AFs%5B3%5D%3D%27%5C0%27%E6%80%8E%E4%B9%88%E8%A7%A3%E9%87%8A%E5%95%8A)
x)KH,R(UJLJNIMS.6U1P~wkXzdgNj_w=eTO v6pOv/}ZOh?tk=ٱYǪg?[?&L[n|ʊ̼4
%b%bM&?mt DĈ
=@QQ1CA"tۣ1f>iϮmwO~6w@$ف BT
char s[]="abcdef";s[3]='\0';当中是s[3]='\0'怎么解释啊
char s[]="abcdef";s[3]='\0';当中是s[3]='\0'怎么解释啊
char s[]="abcdef";s[3]='\0';当中是s[3]='\0'怎么解释啊
可以狭义的理解将字符串截断,
比如,char s[]="abcdef";就用printf("%s",s);输出是abcdef,
而当s[3]='\0',输出就是abc,printf %s就是以‘\0’来区分结束位的