This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
About a paradox of post increment operator
- From: "孙宗君" <szj087 at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 10 Dec 2007 09:13:39 +0800
- Subject: About a paradox of post increment operator
Hi, all
I am not sure whether this is a proper place to put up with my
question. But I think you can answer my question.
See following two clauses
int x=20, y=35, z;
case 1: x = x++ + y++;
case 2: z = x++ + y++;
in case 1. the result is x = 36;
in case2: the result is z = 35;
Whether this is a paradox for post increment operator ?
Look forward to your kindly answers.
Thanks very much.
BRs
Zongjun.