Choose the correct option to frame a question from the following sentence, using the appropriate punctuation

I asked him why he wasn’t in class.

(A) I asked him-“Why you not in class?”
(B) I asked him, “Why you are not in class?”
(C) I asked him: ‘Why you are not in class?”
(D) I asked him, “Why are you not in class?”

Ans: (D) I asked him, “Why are you not in class?”