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 is the value of b
if a=5;
b=++a + ++a

Answer Posted / naresh

Not a very tough question. Important thing to note that in
any expression pre increment operator has a higher prority
than arithemetic operator as a result value of a is
increment is first two times then value of b is evaluated.
So b = 7*7 = 14.
in first ++a we get a=6
in next ++a we get a=7
and b=7+7=14

This question will result in same output for most of the
compilers, but some rare compiler may produce an entire
diffrenent parse tree resulting in an undefined result

Is This Answer Correct ?    28 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are global variables and explain how do you declare them?

1029


What are header files and explain what are its uses in c programming?

1063


What are 3 types of structures?

1024


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2044


What is the use of a static variable in c?

1006


What is "Duff's Device"?

1111


How many parameters should a function have?

1125


Explain what header files do I need in order to define the standard library functions I use?

1114


What is bubble sort technique in c?

931


How can I write functions that take a variable number of arguments?

1075


Can we assign integer value to char in c?

1155


What is a structural principle?

1090


Why we use break in c?

934


Why is c so popular?

1116


please send me the code for multiplying sparse matrix using c

2119