C. It is the person or thing to or for whom the verb's action is done.
Option C is correct because if we look at the sentence: I bought Alex shoes. The indirect object is Alex. Alex is the person to or for whom the shoes were bought. Option A is not correct because of the sentence: He bought himself groceries. An indirect object tells who the direct object is for. In this sentence the groceries (direct object) is for himself. This proves A wrong. Option B is not correct because of the sentence: I bought groceries. The direct object is groceries and there is no indirect object. Option D is also wrong because of the previous sentences. The indirect object is almost never before the verb in the sentence.