第30439题 单选题
以下C++代码运行后,std::string变量s的最终值为?
#include <string>
int main() {
    std::string s = "hello,world!";
    s.erase(5, 1);
    s = s.substr(0, s.find('!'));
    s.append(" C++");
    return 0;
}
A

hello,world C++

B

helloworld! C++

C

hello C++

D

helloworld C++

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