#2723. [GESP202312 三级 C++] 第 5 题
[GESP202312 三级 C++] 第 5 题
执行下面C++代码后,输出是( )。
string str=("chen");
int x=str.length();
int temp=0;
for(int i=0;i<=x;i++)
{
temp++;
}
cout<<temp<<endl;
{{ select(1) }}
- 4
- 2
- 5
- 3
执行下面C++代码后,输出是( )。
string str=("chen");
int x=str.length();
int temp=0;
for(int i=0;i<=x;i++)
{
temp++;
}
cout<<temp<<endl;
{{ select(1) }}