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 does %p mean?

1158


Do string constants represent numerical values?

1450


How can you access memory located at a certain address?

1164


List the variables are used for writing doubly linked list program.

2086


while initialization of array why we use a[][2] why not a[2][]...?

2404


Describe the header file and its usage in c programming?

1107


Why do we need a structure?

1082


What is p in text message?

1039


What is the difference between array and pointer?

1085


What is union and structure in c?

1290


What are the types of type specifiers?

1097


Can you add pointers together? Why would you?

1182


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

2311


What is typeof in c?

1064


Explain how do you declare an array that will hold more than 64kb of data?

1500