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...

What will be the output of
x++ + ++x?

Answer Posted / shivu

4

printf or any other expression executes from right. So first
prefix increment. then 2 and assigned to y. and will get add
with the result again, then it will increment.
now the value of x is 3. but the output is 4.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a scope resolution operator in c?

1209


Is the exit() function same as the return statement? Explain.

1040


How do you do dynamic memory allocation in C applications?

1048


Explain the use of #pragma exit?

1117


How do you determine whether to use a stream function or a low-level function?

1082


Differentiate abs() function from fabs() function.

965


Explain what is the benefit of using const for declaring constants?

969


What is the use of structure padding in c?

1015


Why is C language being considered a middle level language?

1047


Explain how can I prevent another program from modifying part of a file that I am modifying?

1041


How do c compilers work?

1050


Explain the binary height balanced tree?

1129


How can I use a preprocessorif expression to ?

1003


how to count no of words,characters,lines in a paragraph.

4380


What is extern keyword in c?

1086