arithmetic Flashcards

(10 cards)

1
Q

What is the result of (15 % 2) - 1 + 4 * (16 / 4)?

A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Evaluate 40 – Math.Pow(6, 2) % 3

A

1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why does int num = 20 / 3; result in 6?

A

Because integer division discards the fractional part.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to get precise division result for 20/3?

A

Use: double num = 20.0 / 3;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is 100 == Math.Pow((3+7),2)?

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does (3 + 9 / 3) > 7 && (45 / 9) < 6 evaluate to?

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is result of “1” + “1” == “11” in a boolean?

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Is “A” == “a” in C#?

A

false (case sensitive)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Arithmetic operator to find remainder?

A

% (modulus)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What operator performs power?

A

Math.Pow(base, exponent)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly