The correct option is D all of the above
When two or more ions of the same charge are present in a solution of an electrolyte, under identical conditions, and are competing for discharge at the same electrode, one of them gets preferentially discharged. This is known as selective discharge of ions.
Selective discharge of ions depends on three factors :
(a) The relative position of ions in the electrochemical (activity) series.
(b) The relative concentration of ions.
(c) The nature of the electrodes.