RE: [LIP] Doubt in ++ operator
"Anand, Dheeraj KumarX" <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <ECE0BDFC20DD6847B46127F0697EA8560CBB55@bgsmsx403> |
Next time , it should be 9 as you are calling ++ two times.
Dheeraj
-----Original Message-----
From: linux-india-programmers-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:linux-india-programmers-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf
Of Vardhman Jain
Sent: Sunday, July 25, 2004 8:41 PM
To: linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [LIP] Doubt in ++ operator
Hi,
I have a doubt whether the following code should really be compiler
dependent.
int i=7;
int j=i++ * i++;
printf("%d",j);
I think the answer should always be 49, as the ++ operator comes to
action after the completion of the statement with the ';', But is
there some reason the i++ should increment i before the next i++ is
read means should the second i++ be read as 8 or 7?? Is this behaviour
undefined in c ??
Vardhman
--
*************************************
Vardhman Jain, Btech 4rd Year@IIIT Hyderabad
website: http://students.ac.in/~vardhman
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
linux-india-programmers mailing list
linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/linux-india-programmers
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click