#GOBJ306L. GESP 3级客观题|模拟算法与程序推演|课堂讲解

GESP 3级客观题|模拟算法与程序推演|课堂讲解

GESP 3级客观题|模拟算法与程序推演|课堂讲解

考试频率:高频。本卷共 2 题。

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

    {{ select(1) }}

  • string str("GESP"); cout<<str<<endl;
  • string str="GESP"; cout<<str<<endl;
  • string str("GESP"); cout<<str[1]<<str[2]<<str[3]<<str[4]<<endl;
  • string str{"GESP"}; cout<<str<<endl;
  1. 下面C++代码执行后的输出是( )。
char ch[10] = {'1'};
cout << ch[2] << endl;

{{ select(2) }}

  • 0
  • 1
  • 输出空格
  • 什么也不输出
蜀ICP备2025119001号-1