RE: [LIP] Doubt in ++ operator
Raj Mathur <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Abdul" == Abdul Faruk <[email protected]> writes: Abdul> int i=7; int j=i++ * i++; printf("%d",j); The above set of Abdul> instruction will give you 7 * 8 = 56. Not necessarily. Using the increment or decrement operator multiple times within the same sequence point is undefined, and while you MAY get 56, you could also get 49, 64 or perhaps even 42 (!) or 7,000,000 by the definition of C. Don't depend on this behaviour. Abdul> [snip] Regards, -- Raju -- Raj Mathur [email protected] http://kandalaya.org/ GPG: 78D4 FC67 367F 40E2 0DD5 0FEF C968 D0EF CC68 D17F It is the mind that moves ------------------------------------------------------- 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