第28692题 单选题
以下关于C++除法运算的描述,正确的是?
A

执行代码int a=5, b=2; cout << a/b << endl;,输出结果为2.5

B

执行代码double c=5, d=2; cout << c/d << endl;,输出结果为2

C

执行代码int e=5, f=2; cout << (double)e / f << endl;,输出结果为2.5

D

表达式5 / 2.0会触发整数除法,最终结果为2

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