单选题

执行上述代码后,输出的结果是什么(    )

int a = 10;
int &ref = a;
ref = 20;
cout << "a = " << a << endl;
cout << "ref = " << ref << endl;
A

a = 10

ref = 20

B

a = 20

ref = 10

C

a = 20

ref = 20

D

编译错误

赣ICP备20007335号-2