yup the answer is 4 5 5 4 5 whenever a function is called the the values are put in the stack from left to right and are poped one after the other in the right to left order hence the evaluation takes place from right to left(it is not anly the printf function).
4 5 5 4 5
ReplyDelete6 5 6 5 5
ReplyDelete4 5 5 4 5
ReplyDeleteprintf start from right n continue 2wards left
yup the answer is 4 5 5 4 5
ReplyDeletewhenever a function is called the the values are put in the stack from left to right and are poped one after the other in the right to left order hence the evaluation takes place from right to left(it is not anly the printf function).
ok but
ReplyDeletefrom right to left
i = 5
--i = 4
++i = 5
i-- = 5 and due to post increment "i" value will be 4
i++ = 4 and due to post increment "i" will be 5