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 a satellite assembly in c#?

943


Is class reference type c#?

877


Is ram a heap?

863


What is the process of delegation?

912


How to get the sum of last 3 items in a list using lambda expressions?

887


explain the three services model commonly know as a three-tier application.

927


What is dao in c#?

823


Can a class be protected in c#?

851


What are satellite assemblies? How will you get the different language strings?

864


Why do we use static class in c#?

853


What is array and arraylist?

957


What is the difference between ref and out parameters in c#?

936


Why do we need ienumerable in c#?

856


Explain what are three test cases you should go through in unit testing?

877


Define thread? Explain about multithreading?

911