第32172题 单选题
以下C++代码执行后,控制台的输出结果是?
#include <iostream>
#include <string>
using namespace std;
int main() {
    string s = "Hello,World!";
    int pos = s.find(',');
    string res = s.substr(pos + 1, 5);
    cout << res.size() << res << endl;
    return 0;
}
A

5World

B

6World

C

5World!

D

6World!

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