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

How many data structures are there in c?

1170


What is cohesion and coupling in c?

1096


Explain what is the difference between far and near ?

1166


Can static variables be declared in a header file?

1103


Write a program to generate the Fibinocci Series

1303


What is the use of sizeof () in c?

1099


Explain the Difference between the New and Malloc keyword.

1190


Can stdout be forced to print somewhere other than the screen?

1090


What is structure padding and packing in c?

1124


How to declare pointer variables?

1315


What are identifiers in c?

1243


What is variable and explain rules to declare variable in c?

1179


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

1157


Describe wild pointers in c?

1166


In C language what is a 'dangling pointer'?

1242