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 do the 'c' and 'v' in argc and argv stand for?

1219


Can you please explain the difference between syntax vs logical error?

1240


Difference between malloc() and calloc() function?

1271


What is register variable in c language?

1062


What does the characters “r” and “w” mean when writing programs that will make use of files?

1540


What is keyword in c?

1063


What is ponter?

1326


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

1206


Write a program for finding factorial of a number.

1142


Describe the order of precedence with regards to operators in C.

1100


How do I swap bytes?

1120


What does c mean before a date?

1229


Explain how can I pad a string to a known length?

1249


How can I swap two values without using a temporary?

1155


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1958