全部题库 / C++ / 试题详情
单选题 C++
2008-03-21

有如下程序: 
#include  
void fun(int& x, int y) { int t = x; x = y; y = t; } 
int main( ) 
{ 
int a[2] = {23, 42}; 
fun(a[1], a[0]); 
std::cout << a[0] << ", " << a[1] << std::endl; 
return 0; 
} 
执行后的输出结果是(  )

A.42, 42  
B.23, 23  
C.23, 42  
D.42, 23

参考答案

B

答案解析

暂无解析

你可能感兴趣的试题