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

Can you have more than one namespace in c#?

950


Can we make a Static Constructor Parameterized? Give Reason with your answer

978


Explain About web methods and its various attributes

986


What is the difference between structure and class in c#?

979


What is serialization in .net?

993


What is the purpose of dependency injection?

925


What is the delegates in c#?

923


What is console application with example?

935


What does static mean in c sharp?

1073


Explain About Web.config

981


What is the and operator in c#?

983


What is the Signification of the "new " keyword in C#? example

949


What are namespaces, and how they are used?

1011


Explain the difference between a Private Assembly and a Shared Assembly

983


What are fields in c#?

903