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 is a void pointer? When is a void pointer used?

1062


what is the different bitween abap and abap-hr?

2332


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1056


Difference between macros and inline functions? Can a function be forced as inline?

1274


What is the difference between ++a and a++?

1213


What are the c keywords?

1205


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1408


If the size of int data type is two bytes, what is the range of signed int data type?

1026


When was c language developed?

1196


what do u mean by Direct access files? then can u explain about Direct Access Files?

2096


Can main () be called recursively?

1123


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

2278


What are file streams?

1020


When is a null pointer used?

1116


Do you know null pointer?

1028