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 i=5;
printf("%d",i++ + ++i);
}

Answer Posted / vivers

There are two different questions..
in which its asking the result for

1)(i++ + ++i)
answer will be---> 12
"as addition will takes place from left to right
step1: i++ = 5;
step2: value of i will be updated before taking value of
another operand and hence i = 6;
step3: ++i = 7 as first increment will happen and then value
will be used.
final result: 5 + 7 = 12"

2) (i+++++i)
answer will be---> compile error
"because illegal combination of operators"


best of luck...

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why cant I open a file by its explicit path?

1041


What is the return type of sizeof?

1067


What are the differences between Structures and Arrays?

1222


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

2028


can we implement multi-threads in c.

1139


What type of function is main ()?

1048


What's the difference between constant char *p and char * constant p?

1154


Define C in your own Language.

1089


Combinations of fibanocci prime series

1621


What is use of bit field?

1304


Why does not c have an exponentiation operator?

1061


What does *p++ do? What does it point to?

1069


Differentiate Source Codes from Object Codes

1594


Why do we use null pointer?

1075


what is the difference between 123 and 0123 in c?

1211