Choose the sentence with correct use of the past perfect continuous tense:
A. They had been studying for hours before the exam.
B. They had studied for hours before the exam.
C. They had been studied for hours before the exam.
D. They had been studying for hours after the exam.
The correct form is "They had been studying for hours before the exam," using the past perfect continuous tense to indicate a continuous action before a past event.