同意,应该是10,这题考的是++在函数前后的区别

本帖于 2004-06-29 08:23:49 时间, 由普通用户 hamburg 编辑
回答: 请教:关于c深海鱼游2004-06-27 23:39:22

in print out statement, a++ hasn't done the arithmetic operation yet, so the result should be the same as a.
before the statement of ++a, a++ has done already, so a is changed as 11.
In ++a, the arithmatic operation should be done before print out statement, so 11 + 1 is 12, which is the new value of a.

Forgot the terminological name of such kind of question, but the theory should work in this way.

Correct me, please, if I am wrong.

请您先登陆,再发跟帖!