public void A() {
int x;
x = 8;
x *= 4 + 8 / 2;
}
Given the above code, what is the value of "x"?
Answer Posted / aspdev556
Sorry for the confusion, figured it out.
x = x * 4 + 8 / 2 only multiplies x by 4 not the whole
expression.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Is c# lazy thread safe?
What is string pool in c#?
What is the difference between an integer and int?
Explain how can you clean up objects holding resources from within the code?
What are the fundamental oop concepts?
What are the return types in c#?
What is the meaning of console writeline in c#?
Is overriding of a function possible in the same class?
what optimizations does the c# compiler perform when you use the /optimize+ compiler option?
What are generations and how are they used by the garbage collector?
Can we inherit class that contains only one private constructor?
What is a void c#?
Can you specify nested classes as partial classes?
What is the difference between finalize() and dispose() methods?
Explain code compilation in c#.