Geeks Talk

Prepare for your Next Interview




c program concept..

This is a discussion on c program concept.. within the PeopleSoft forums, part of the Enterprise Solutions category; hi frnds.. looking a very simple program...when you analyse out put must be 45545.... but the same program you run on the PC(microsoft visula c++ tool) it will ...


Go Back   Geeks Talk > Enterprise Solutions > PeopleSoft

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-28-2007
Contributing Member
 
Join Date: Jul 2007
Location: India
Posts: 31
Thanks: 6
Thanked 4 Times in 4 Posts
kamanianil is on a distinguished road
Smile c program concept..

hi frnds..

looking a very simple program...when you analyse out put must be
45545....

but the same program you run on the PC(microsoft visula c++ tool) it will show out put
55545..

why ?
can any body help me on this occasion ?

void main()
{
int i;
printf("%d%d%d%d%d",i++,i--,++i,--i,i);
getch();
}
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-28-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,007
Thanks: 0
Thanked 76 Times in 64 Posts
psuresh1982 will become famous soon enough
Re: c program concept..

I can only assume that there is an order of precedence here. I'm just not sure if its adding everything first and then incremeting it or v.s.

I have attached two url's that go on about this in a little more detail.

http://www.embedded.com/shared/prin...ticleID=9900607

http://www.adp-gmbh.ch/blog/2005/march/17.html

---------------------------
suresh
Reply With Quote
Reply

  Geeks Talk > Enterprise Solutions > PeopleSoft


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Knowledge about Program ID in Cobol program RyanJames MainFrame 2 02-14-2008 09:32 AM
Version concept espiderz42 Testing Issues 2 04-19-2007 04:37 AM
Want to know the Concept StephenRaj Unix/Linux 4 01-12-2007 07:54 AM
Concept in .NET JohnMathew ASP.NET 2 10-09-2006 04:25 PM
Concept of Denormalization RyanJames Database General 3 06-30-2006 03:00 AM


All times are GMT -4. The time now is 12:35 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved