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

int main() {
    string str = "I love programming";
    str.erase(7, 4);
    str.append("C++");
    string res = str.substr(2, 8);
    cout << res << endl;
    return 0;
}
A

"love ram"

B

"love programmingC++"

C

"ove ramm"

D

"love ra"

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