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 / m upendra reddy

i t will foloows the rule of BADMAS
THAT'S why first it caliculate ,like first checks is there
any divisions then caliculate and then multiplictations


x=x*4+8/2;
8/2=4;
then
x=x*4+4;
then x=x*4;==>8*4=32;
now
x=32+4;===>x=36

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an argument in c#?

913


What is multicast delegate explain with example?

946


What is sorted list in c#?

870


What is the difference between interface and inheritance in c#?

877


Can dictionary have duplicate keys c#?

839


What are the different ways of method can be overloaded?

855


Can you inherit from multiple classes in c#?

852


While debugging a C# application can you change the value of a variable?

1001


What is reflection in c#?

869


Are multiple data types stored in System.Array?

1144


How can I make sure my c# classes will interoperate with other .net languages?

982


What are the concepts of dispose method?

898


Is goto statement supported in c#?

901


Are structs faster than classes?

895


How can it prevents DLL Hell assembly versioning in .NET?

994