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

3wor

B

5world

C

3llo

D

5,worl

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