arithmetic Flashcards
(10 cards)
1
Q
What is the result of (15 % 2) - 1 + 4 * (16 / 4)?
A
8
2
Q
Evaluate 40 – Math.Pow(6, 2) % 3
A
1
3
Q
Why does int num = 20 / 3; result in 6?
A
Because integer division discards the fractional part.
4
Q
How to get precise division result for 20/3?
A
Use: double num = 20.0 / 3;
5
Q
What is 100 == Math.Pow((3+7),2)?
A
true
6
Q
What does (3 + 9 / 3) > 7 && (45 / 9) < 6 evaluate to?
A
false
7
Q
What is result of “1” + “1” == “11” in a boolean?
A
true
8
Q
Is “A” == “a” in C#?
A
false (case sensitive)
9
Q
Arithmetic operator to find remainder?
A
% (modulus)
10
Q
What operator performs power?
A
Math.Pow(base, exponent)