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

What is || operator and how does it function in a program?

1096


find out largest elemant of diagonalmatrix

2256


How many bytes are occupied by near, far and huge pointers (dos)?

1161


What does the error 'Null Pointer Assignment' mean and what causes this error?

1226


Differentiate between functions getch() and getche().

1055


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1062


How reliable are floating-point comparisons?

1102


When should we use pointers in a c program?

1143


Can we replace the struct function in tree syntax with a union?

1312


What are the difference between a free-standing and a hosted environment?

1293


What do you understand by normalization of pointers?

1060


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1723


What is the sizeof () operator?

1088


What are the 5 elements of structure?

1084


Why do we use null pointer?

1073