public void A() {
int x;
x = 8;
x *= 4 + 8 / 2;
}
Given the above code, what is the value of "x"?
Answer Posted / m upendra reddy
i t will foloows the rule of BADMAS
THAT'S why first it caliculate ,like first checks is there
any divisions then caliculate and then multiplictations
x=x*4+8/2;
8/2=4;
then
x=x*4+4;
then x=x*4;==>8*4=32;
now
x=32+4;===>x=36
| Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
What is IL / CIL / MSIL?
How do I download a program to my desktop?
How to use nullable types in .net?
How to implement an object pool in c#.net.
Can dictionary have duplicate keys c#?
What is the difference between select and selectmany?
Explain the Abstract class in c#.net
Is list immutable in c#?
What are the generation of Garbage Collection in C# .NET ?
How do you encapsulate in c#?
What are functions in c#?
What is a predicate in c#?
Int map to which .net types?
What is the difference between struct and class in c#?
Can a struct be null?