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 are regular expressions? Search a string using regular expressions?

914


what is a destructor?

1047


How do you declare a variable in c#?

1011


If you want to convert a base type to a derived type, what type of conversion do you use?

1026


What is literal in c#?

946


how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.

1772


What is difference between dictionary and list in c#?

928


List the fundamental oop concepts?

941


Enlist the different types of classes in c#?

974


What are the Types of assemblies that can be created in dotnet

1210


What do you mean by default constructor?

1142


Define property in c#.net?

1011


Differentiate between object pooling and connection pooling in c#?

1040


How to find Percentage, name ,College from a resume or document ? How to export these values to other page in C#?

974


Explain about c# language.

1110