以下程序的输出结果是 【6】 。 #include <stdio.h> main() { int a=2,b=3,c=4; a* =16+(b++) -(++c); Printf("%d",a); }
参考答案:28
解析: a*=16+(b++)-(++c)等价于a=a*(16+(b++)-(++c)),b++的值为 3,++c的值为5,这里要注意前缀++和后缀++的用法。
以下程序的输出结果是 【6】 。 #include <stdio.h> main() { int a=2,b=3,c=4; a* =16+(b++) -(++c); Printf("%d",a); }
参考答案:28
解析: a*=16+(b++)-(++c)等价于a=a*(16+(b++)-(++c)),b++的值为 3,++c的值为5,这里要注意前缀++和后缀++的用法。