A-A+

有以下程序 #include<iostream.h float fun(int x int

2022-08-05 23:42:23 问答库 阅读 173 次

问题详情

有以下程序 #include<iostream.h float fun(int x,int y) {return(x+y);} void main() {int a=2,b=5,c=8; cout<<fun((int)fun(a+c,b),a-c);} 程序运行后的输出结果是()。
A.编译出错
B.9
C.21
D.9请帮忙给出正确答案和分析,谢谢!

参考答案

正确答案:B

考点:程序