August 10, 2009 at 12:01 PM
Output is 63.
As you have set the value 7 to the variable i.The i++ increments the number after its use therefore it uses 7 and then increment it to 8, the ++i increments the value before using it so the value of i becomes 9.Therefore the output comes to 7*9 i.e 63.
August 10, 2009 at 12:36 PM
i initialised to 7.
Breaking your code to to steps:
i++ = 8. But since it is post increment, 7 will be passed 1st and then incremented to 8..
++i = 9. Since at this point i was incremented to 8 and since it is pre increment, value is 1st incremented and then passed..