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

When is the “void” keyword used in a function?

1428


what do you mean by inline function in C?

1005


What is the scope of an external variable in c?

981


What is the difference between formatted&unformatted i/o functions?

1003


Explain the use of 'auto' keyword

1071


What are the restrictions of a modulus operator?

1062


Are the variables argc and argv are always local to main?

970


What is structure data type in c?

968


Is there any demerits of using pointer?

1014


Compare array data type to pointer data type

966


What functions are in conio h?

1146


What is the meaning of ?

988


What is break statement?

1055


What is static and auto variables in c?

1020


What are external variables in c?

1036