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

What is iqueryable?

878


What is callback in c#?

860


List the differences between method overriding and method overloading?

920


Where do we set the min and max pool size for connection pooling?

933


Explain About web methods and its various attributes

935


How do I format in c#?

835


What is serialization in dot net?

902


What is a linked list c#?

856


When should I throw an exception?

959


Can enum have methods c#?

852


Can you use all access modifiers for all types?

937


What does out mean c#?

902


What is a verbatim string literal and why do we use it?

912


What are winforms in c#?

880


What are jump statements in c#?

914