> 其他 >
设有定义int a=20,b=3;则表达式a+=(b%=2)的值为——( B )为什么
设有定义int a=20,b=3;则表达式a+=(b%=2)的值为——( B )为什么 A.20 B.21 C.0 D.23
人气:307 ℃ 时间:2020-04-24 11:35:21
解答
按照运算优先级,先计算b%=2,由于是int型变量,则3%2=1,a+=(b%=2)即为a+=1,结果为21
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版