Mathematical Expressions MCQ Practice

Question 1 of 10

What is 13 MOD 5?

  1. A. 0
  2. B. 2
  3. C. 3
  4. D. 5

Question 2 of 10

Evaluate 18 / 3 + 2 * 4.

  1. A. 16
  2. B. 30
  3. C. 12
  4. D. 14

Question 3 of 10

List grid holds 1, 3, 5, 7 at indexes 1 through 4. What is displayed?

p ← 3
DISPLAY (grid[p MOD 3 + 1])
  1. A. 1
  2. B. 3
  3. C. 5
  4. D. 7

Question 4 of 10

What is the value of 10 + 2 * 3 - 16 MOD 6?

  1. A. 16
  2. B. 12
  3. C. 10
  4. D. 14

Question 5 of 10

Which statement about MOD is true?

  1. A. MOD ignores uneven division
  2. B. n MOD n equals 1 for every positive integer n
  3. C. n MOD n equals 0 for every positive integer n
  4. D. MOD always returns a fraction

Question 6 of 10

A rotating banner uses index ← (day MOD 3) + 1 into a list of three messages. If day is 8, which index is used?

  1. A. 8
  2. B. 1
  3. C. 2
  4. D. 3

Question 7 of 10

Evaluate (7 + 1) * 2 - 3.

  1. A. 13
  2. B. 11
  3. C. 16
  4. D. 5

Question 8 of 10

For which value is n MOD 4 equal to 3?

  1. A. 14
  2. B. 15
  3. C. 16
  4. D. 12

Question 9 of 10

What is 27 MOD 4?

  1. A. 1
  2. B. 2
  3. C. 3
  4. D. 0

Question 10 of 10

List ages holds 11, 14, 17, 20 at indexes 1 through 4. What is displayed?

r ← 19 MOD 6
DISPLAY (ages[r])
  1. A. 14
  2. B. 17
  3. C. 20
  4. D. 11