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
What is Co- and Contra-Variance in C#?
What is console read in c#?
What is the difference between ienumerable and icollection?
What is hashtable c#?
What is this keyword in C#?
list the steps in code compilation in c#?
What are managed providers?
How Do You Convert A Value-type To A Reference-type?
What is multithreading? What are the problems that comes with multithreading and how to manage them?
What is marshalling and what are different kinds of marshalling?
Do we get an error while executing the “finally” block in c#?
Explain how do you directly call a native function exported from a dll?
What is the difference between the debug class and trace class? Documentation looks the same.
What's the difference between abstraction and encapsulation?
What is the use of delegate?