You are right but if you read my message you will find that i substituted with m=5 so i got this Thanks Eng A.Mahmoud --- On Fri, 5/29/09, John Matthews <[email protected]> wrote:
From: John Matthews <[email protected]> Subject: [c-prog] Re: confusing output To: [email protected] Date: Friday, May 29, 2009, 11:41 AM --- In c-p...@yahoogroups. com, Ahmed Mahmoud <eng_hamada2585@ ...> wrote: > > i hope you read them -this is true as i tried them many times if you have > another opinion illustrate it In the expression: v=(m++)+(++m) ; the value of v depends on the order of evaluation. Therefore the result is undefined - you might get 12, I might get 7329. Tomorrow I might get -367. The day after, the program might crash. Yes, it's unlikely, but that's the official answer - you can assume that the answer is always going to be 12 if you like, but your program is erroneous, incorrect, etc. This is explained in previous posts, which is why I was surprised at your post. [Non-text portions of this message have been removed]
