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
Does c# provide copy constructor?
List down the differences between public, static and void keywords?
What is an escape sequence? Name some string escape sequences in c#.
Name any three ways to pass parameters to a method in c#?
Is class reference type c#?
What does the parsefloat function do?
What is the data encapsulation?
What are the two kinds of properties in c#.
What are the types of parameters in c#?
Explain a MSIL ? Why is it appreciated by all developers?
Is list a collection c#?
What is new method in c#?
What do you mean by jagged arrays in c#?
What is difference between singleordefault and firstordefault?
What is serialization in unity?