填空题
以下程序的输出结果是{{U}} 【9】 {{/U}}。 #include<iostream.h> void main( ) { char s[ ]="abcdef";s[3]='/0'; cout<<s<<endl;}
1、
【正确答案】
1、【9】abc
【答案解析】
解析:本题中,给数组s中的第4个元素s[3]赋以'/0',则s数组中只有前3个元素有效,输出结果为abc。
提交答案
关闭