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 / vishnu

first calculations will be done from right to left and then
prints accroding to the parameters passed.

Is This Answer Correct ?    29 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an lvalue in c?

1129


Why does everyone say not to use gets?

1109


What is the use of sizeof?

1022


Do you know what are the properties of union in c?

1083


Is register a keyword in c?

1048


Explain the use of function toupper() with and example code?

1137


what is different between auto and local static? why should we use local static?

1128


When should you not use a type cast?

1127


How does sizeof know array size?

1126


How many levels deep can include files be nested?

1142


What does do in c?

1060


Can two or more operators such as and be combined in a single line of program code?

1375


In a switch statement, explain what will happen if a break statement is omitted?

1076


What is a floating point in c?

1075


how to count no of words,characters,lines in a paragraph.

4432