A relative pronoun is used to connect a clause or phrase to a noun or pronoun. you see them used everyday with the most common relative pronouns being: who, whom, which, whoever, whomever, whichever and that. So the answer D. Direct object. I hope you are satisfied with my answer and feel free to ask for more
The function of the relative pronoun <em>which </em>in the adjective clause is D) direct object. It refers to the phrase a snack of almonds, which is also a direct object.