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 are regular expressions? Search a string using regular expressions?
what is a destructor?
How do you declare a variable in c#?
If you want to convert a base type to a derived type, what type of conversion do you use?
What is literal in c#?
how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.
What is difference between dictionary and list in c#?
List the fundamental oop concepts?
Enlist the different types of classes in c#?
What are the Types of assemblies that can be created in dotnet
What do you mean by default constructor?
Define property in c#.net?
Differentiate between object pooling and connection pooling in c#?
How to find Percentage, name ,College from a resume or document ? How to export these values to other page in C#?
Explain about c# language.