How is the underlined pronoun used in the sentence?

WHO was the eighth president of the United States?

A.
direct object

B.
object of a preposition

C.
subject

Who is the underlined word.