The correct option is D Both (a) and (c)
In a galvanic cell, chemical energy is converted to electrical energy.
In the given figure, electrons flow from A to B, which means A is anode and B is the cathode.
At anode, oxidation takes place and at cathode, reduction takes place.
Half cell electrodes having higher E0 will undergo reduction reaction and lower E0 will undergo oxidation reaction.
Thus,
In (a), Mg get oxidised and Cu get reduced.
Mg(s)+Cu2+(aq)→Mg2+(aq)+Cu(s)
In (b), Cu will get oxidised and Ag will get reduced. So, this arrangement of electrode does not used in galvanic cell.
In (c), Mg get oxidised and Ag get reduced.
Mg(s)+2Ag+(aq)→Mg2+(aq)+2Ag(s)