第29277题 单选题
分析以下C++程序的输出结果,两次cout的输出依次为?
#include <iostream>
using namespace std;

void func(int a, int& b) {
    a++;
    b++;
    cout << a << "," << b << endl;
}

int main() {
    int x = 1, y = 2;
    func(x, y);
    cout << x << "," << y << endl;
    return 0;
}
A

2,3 和 1,2

B

2,3 和 1,3

C

1,2 和 1,3

D

2,2 和 1,3

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