‹ 上一题 下一题 ›

g3-03607. GESP-3级-2024-12-单选-第09题 未做

下列程序输出的是( )。

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. 不能正确执行
未选择
输入
输出

            
答案