Quem corresponds to who / whom. Whom is used in three different contexts.
quem => who is the subject of the question: Who calls me?
quem => whom is the direct subject of the question: Whom did you see?
quem => whom is used with a preposition: Whom did you talk to?
Quem in Portuguese can be used to ask for the direct object and the subject. In some cases we can get therefore ambiguous sentences.
Quem viu a mulher?
Who saw the woman?
Whom saw the woman?
In this case we can use the preposition a to clear the situation. The preposition a is normally used to mark the indirect object and in Spanish the use of a is compulsory in case that the direct object is a human being. In Portuguese a direct object is never marked with the preposition a, but, this is an exception, we can use the preposition a with quem, if that helps to avoid ambiguities.
The interrogative pronouns can be used as well as relative pronouns, see relative pronouns.
choose the right option in the following sentences.