2. A math test consists of 20 questions. The scoring rules are: 5 points for each correct answer, 0 points for no answer, and -2 points for each wrong answer. It is known that in this test, the total scores of Xiaoqiang and Xiaogang are equal, and the score is a prime number. Then the situation of Xiaoqiang and Xiaogang answering questions is ( ).
(A) Both answered the same number of questions correctly
(B) The number of questions they answered correctly differs by 2
(C) The number of questions they answered correctly differs by 4
(D) Any of the above three situations is possible
2.D.

According to the problem, by enumerating the possibilities of answering 20 questions, 19 questions, ... correctly, we find:
(1) Xiaoqiang and Xiaogang may both answer 17 questions correctly, 1 question incorrectly, and leave the remaining 2 questions unanswered, scoring 83 points each;
(2) Xiaogang and Xiaoqiang may both score 53 points, with one person answering 13 questions correctly, 6 questions incorrectly, and leaving 1 question unanswered, while the other person answers 11 questions correctly, 1 question incorrectly, and leaves the rest unanswered;
(3) Xiaogang and Xiaoqiang may also both score 23 points, with one person answering 9 questions correctly and the rest incorrectly, and the other person answering 5 questions correctly, 1 question incorrectly, and leaving the rest unanswered.