‹ 上一题 下一题 ›

g3-03501. GESP-3级-2023-12-单选-第03题 未做

下面 C++ 代码执行后不能输出 "GESP" 的是( )。

  • A. ```cpp
    string str("GESP"); cout<<str<<endl;
- **B.** ```cpp
string str="GESP"; cout<<str<<endl;
  • C. ```cpp
    string str("GESP"); cout<<str[1]<<str[2]<<str[3]<<str[4]<<endl;
- **D.** ```cpp
string str{"GESP"}; cout<<str<<endl;
未选择
输入
输出

            
答案