From: "Jason News" Newsgroups: comp.os.msdos.djgpp Subject: Que on C Date: Mon, 1 Nov 1999 19:54:22 +0800 Organization: netteens.net (Hongkong Telecom IMS) Lines: 57 Message-ID: <7vjv87$32f$1@imsp026.netvigator.com> NNTP-Posting-Host: olkc10a130.netvigator.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0018_01BF24A2.E43E6720" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_0018_01BF24A2.E43E6720 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everyone, can anyone tells me why int x=3D5, y=3D5; printf ("1st %d, 2nd %d\n" ++x, y++"); will show 1st 6, 2nd 5 int x=3D5 prinf ("1st %d, 2nd %d\n" ++x, x++"); will show 1st 7, 2nd 5 What I don't understand is that the increament of ++x is 1. Then why the = latter one will show 7, the one with increament value 2? ------=_NextPart_000_0018_01BF24A2.E43E6720 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi everyone,
can anyone tells me why
int x=3D5, y=3D5;
printf ("1st %d, 2nd %d\n" ++x, = y++");
 
will show 1st 6, 2nd 5
 
int x=3D5
prinf ("1st %d, 2nd %d\n" ++x, = x++");
 
will show 1st 7, 2nd 5
 
What I don't understand is that the = increament of=20 ++x is 1. Then why the latter one will show 7, the one with increament = value=20 2?
------=_NextPart_000_0018_01BF24A2.E43E6720--