Data Structures & AlgorithmsModerateGATE CS · ICPC regional

How many primes p with 2 <= p <= 30 satisfy p ≡ 1 (mod 4)?

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

Correct answer: C. 4

The primes up to 30 that are 1 modulo 4 are 5, 13, 17 and 29.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic