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

public void A() {
int x;
x = 8;
x *= 4 + 8 / 2;
}
Given the above code, what is the value of "x"?

Answer Posted / vinodh kumar

operator precedence...
* / % + -

x = x * 4 + 8 / 2;

(i) x*(4+(8/2))
(ii) x*(4+4)
(iii) x*8 => Replace x with 8 as per question :P
Ans:64

http://www.blackwasp.co.uk/CSharpOperatorPrecedence.aspx

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between Value type & reference types ? and give the example in .Net?

993


What is xml serialization and deserialization in c#?

1000


What is generic and non generic collections in c#?

882


Can we inherit sealed class in c#?

930


What is int32 maxvalue?

1005


how can one use hcl and c sharp together?

2169


What is the signature of a method?

969


What is an ienumerable in c#?

1055


What is yield keyword?

928


What does assert() do in c#?

1073


What is the difference between static and constant variables?

1130


You are creating a custom usercontrol, some of the newly created properties are shown in the properties window. How you can hide a new property named theme from the properties window?

976


Why do canadians say zed?

1058


What are the Uses of CLR

1258


Should I make my destructor virtual?

1103