未知题型
有以下程序void f(int x,int y){ int t, if(x<y){t=x;x=y;t;}}main(){ int a=4,b=3,c=5; f(a,B) ;f(a,C) ;f(b,C) ; cout<<a<<','<<b<<','<<c<<end1;}执行后输出结果是
D.4,3,5
- A.3,4,5
B.5,3,4
C.5,4,3
【参考答案】
D
解析:考生根据分析可以得知f函数的功能是交换两个变量的值。表明看起来,在main函数中,使用三次f函数完成三......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
