题库 C++/C语言题库 题目列表 在下列代码的横线处填写( ) ,可以...
单选题

在下列代码的横线处填写(  ) ,可以使得输出是GESP IS INTERESTING  。

1 int main()
2 {
3 string str="gEsP is Interesting";
4
5 int x = str.length();
6 for(int i = 0; i < x; i++)
7 if ((str[i]>= 'a ') && (str[i]<= 'z '))
8   ;
9
10 cout << str << endl;
11 cout << endl;
12 return 0;
13  }
A.

str[i]+= 'a '- 'A '

B.

str[i]+=20

C.

str[i]+= 'A '- 'a '

D.

⽆法实现

题目信息
C++语言等级考试真题 2024年 三级 选择题
28%
正确率
0
评论
74
点击