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 IL / CIL / MSIL?

1084


How do I download a program to my desktop?

862


How to use nullable types in .net?

978


How to implement an object pool in c#.net.

1033


Can dictionary have duplicate keys c#?

856


What is the difference between select and selectmany?

916


Explain the Abstract class in c#.net

992


Is list immutable in c#?

863


What are the generation of Garbage Collection in C# .NET ?

944


How do you encapsulate in c#?

910


What are functions in c#?

898


What is a predicate in c#?

907


Int map to which .net types?

1008


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

1222


Can a struct be null?

889