问题 填空题

若a是float型变量,且a=6,则表达式a/2+(int)(a+1)%2的值为 【6】

答案

参考答案:D

解析:

[分析]:a/2的值为3,表达式(int)(a+1)%2的值为1,所以最后结果为4。

填空题
选择题