Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Todd Carnes Newsgroups: comp.lang.c Subject: Re: confusion about behavior Date: Mon, 15 Aug 2011 02:34:03 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 22 Message-ID: References: NNTP-Posting-Host: uqlV+6kNo2Z0TnMsKGN6tA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Pan/0.133 (House of Butterflies) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:9416 On Sun, 14 Aug 2011 19:15:26 -0700, Keith Thompson wrote: [snip] > First of all, (2++) is not a valid expression. I know that it wasn't a valid expression in C. It wasn't supposed to be. I wasn't writing code. I was doing the math... i.e. I was trying to show my thinking that led to an answer of 6 by substituting the values of a and b into the equation and working out the math. I posted that, before I saw your reply regarding post & pre increments. Thanks for the explanation. I get it now. :) > Finally, wouldn't it have been easier to try it yourself > and see what it does? I just did that. However, that only verifies that James was correct about the result being 5. Running the code didn't explain *why* it was 5. You and James did that. :) Todd