AI题库 · GESP-C++三级题库
题目分享 #20736
下列程序输出的是( )
string ch="hello";
if(ch[5]==NULL)
{
cout<<"right"<<endl;
}
else if (ch[5]=='\0')
{
cout<<"wrong"<<endl;
}
else
{
cout<<"hello"<<endl;
}
A
right
B
wrong
C
hello
D
不能正确执行
AI题库 · 编程考级与信奥赛真题库
查看答案 →
复制链接后可在微信、QQ、小红书等平台粘贴分享;答案与解析在题目页。