关于赋值表达式的问题同样的程序:int i=5,q;q=(++i)+(++i)+(++i);printf("%d\n",q);在TC 下的输出是 24 在VC++6.0或dev c++下输出的值是 22不知道C++编译器在这里是怎么对 q=(++i)+(++i)+(++i) 进行计算的,22 是怎么
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/29 06:34:02
![关于赋值表达式的问题同样的程序:int i=5,q;q=(++i)+(++i)+(++i);printf(](/uploads/image/z/8514433-1-3.jpg?t=%E5%85%B3%E4%BA%8E%E8%B5%8B%E5%80%BC%E8%A1%A8%E8%BE%BE%E5%BC%8F%E7%9A%84%E9%97%AE%E9%A2%98%E5%90%8C%E6%A0%B7%E7%9A%84%E7%A8%8B%E5%BA%8F%3Aint+i%3D5%2Cq%3Bq%3D%28%2B%2Bi%29%2B%28%2B%2Bi%29%2B%28%2B%2Bi%29%3Bprintf%28%22%25d%5Cn%22%2Cq%29%3B%E5%9C%A8TC+%E4%B8%8B%E7%9A%84%E8%BE%93%E5%87%BA%E6%98%AF+24+%E5%9C%A8VC%2B%2B6.0%E6%88%96dev+c%2B%2B%E4%B8%8B%E8%BE%93%E5%87%BA%E7%9A%84%E5%80%BC%E6%98%AF+22%E4%B8%8D%E7%9F%A5%E9%81%93C%2B%2B%E7%BC%96%E8%AF%91%E5%99%A8%E5%9C%A8%E8%BF%99%E9%87%8C%E6%98%AF%E6%80%8E%E4%B9%88%E5%AF%B9+q%3D%28%2B%2Bi%29%2B%28%2B%2Bi%29%2B%28%2B%2Bi%29+%E8%BF%9B%E8%A1%8C%E8%AE%A1%E7%AE%97%E7%9A%84%2C22+%E6%98%AF%E6%80%8E%E4%B9%88)
xTNQIɛNnl骛 (8h""ZPlpcÀ1}c/yE$ds=Ǧa:DkӁv]ޗXϰ9Z{%yC(!Qcs#jڳi;r؎hAg1}{5!#Q{ݯ6fn %j*0Rxn]3eUMS9W;Ɨ4>nH"KI~X!UcF