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

typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1637


What is binary tree in c?

1102


Should a function contain a return statement if it does not return a value?

1077


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1980


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2811


Is javascript based on c?

1061


How will you write a code for accessing the length of an array without assigning it to another variable?

1044


what is the different bitween abap and abap-hr?

2318


What are qualifiers and modifiers c?

1003


diff between exptected result and requirement?

2052


Describe the header file and its usage in c programming?

1069


Does c have function or method?

993


What are the two types of functions in c?

1006


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

1271


Why we use stdio h in c?

1030