Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

void main()
{
int a=1;
printf("%d %d %d",a,++a,a++);
}
the output is supposed to be 1 2 2....but it is 3 3 1
this is due to calling conventions of C. if anyone can
explain me how it happens?

Answer Posted / sathish

execution does from right to left and while printing it goes from left to right.

Is This Answer Correct ?    18 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are control structures? What are the different types?

1093


What is FIFO?

1724


What is the difference between test design and test case design?

2093


Why array is used in c?

1016


How do I determine whether a character is numeric, alphabetic, and so on?

1136


What is extern variable in c with example?

997


What is the difference between text files and binary files?

1351


Why calloc is better than malloc?

1037


How can you tell whether a program was compiled using c versus c++?

1108


What are structure members?

1094


What is the use of f in c?

982


What are local static variables? How can you use them?

1148


How can I read in an object file and jump to locations in it?

1033


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

1213


If I have a char * variable pointing to the name of a function ..

1172