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 are the advantages of interface in c#?
What does readonly mean in c#?
Which .gang of four. Design pattern is shown below?
Explain deadlock?
What is a protected class c#?
What is cts, clr?
Which class comes after the SortedList class?
Are c and c# the same thing?
What is meant by enumerable in c#?
What is the use of flag in c#?
What is the difference between a method and a property?
Do void methods have parameters?
what are implementation inheritance and interface inheritance?
Is list a collection c#?
Can I do things in il that I can't do in c#?