第29578题 单选题
以下C++代码运行后的输出结果是?
#include <iostream>
#include <string>
using namespace std;

int main() {
    string s1 = "hello";
    string s2 = "world";
    s1.append(s2, 1, 3);
    s2 = s1.substr(2, 5);
    cout << s2.size() + s2.find("or") << endl;
    return 0;
}
A

8

B

7

C

6

D

5

程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析