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

All,

output of above code is compiler depended i.e the order of
evalulation.

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1919


How can a process change an environment variable in its caller?

1149


write a program fibonacci series and palindrome program in c

988


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16615


How to Throw some light on the splay trees?

1017


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

1008


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1028


Explain the difference between #include "..." And #include <...> In c?

995


will u please send me the placement papers to my mail???????????????????

1807


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1024


What is nested structure in c?

1028


What is build process in c?

1093


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

1016


Explain the process of converting a Tree into a Binary Tree.

2623


Why main is used in c?

1023