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 / aspdev556

64.
Although if you place the same thing like:
x = x * 4 + 8 / 2;
this yields 36 which was my first guess.
How come its producing two different results? Aren't the
assignment statements suppose to get the same result?

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what a diffgram, and a good use for one Define diffgram? How it be used?

965


Explain the role of Garbage collector and its generations?

900


Why do we need structs in c#?

829


What is a copy constructor in c#?

961


Define a class and an object?

943


What is difference between gridview and form view?

977


Can we have multiple threads in one app domain?

925


What is the default scope of a class in c#?

922


What is the default value of object in c#?

888


What is the syntax for calling an overloaded constructor within a constructor?

924


What is tryparse c#?

916


What is Custom attribute? How to create? If I'm having custom attribute in an assembly, how to say that name in the code?

899


What is .cs file in c#?

877


What is the difference between CreateObject() and GetObject()?

1061


What is a generic in c#?

889