未知题型
下面程序运行输出的结果是【 】。
include <iostream>
using namespace std;
int main(){
char a[]='Chinese';
a[3]='/0';cout<<a<<endl;
return 0;
}
【参考答案】
Chi
Chi 解析:字符串的结束标识是'\0',输出字符串时,到第一个'\0'输出结束,而不管其后是否还有数据......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
相关考题
