In the electrolysis of an aqueous solution with inert electrodes, water competes with the solute at both electrodes, so the product is decided by two fixed rules rather than by the salt's name.
Trigger: the words 'aqueous', 'solution', 'dilute' or 'concentrated' next to an electrolysis.
Instances:
(i) at the cathode, a metal is deposited only if it is below hydrogen in the reactivity series (Cu, Ag, Pb); a metal above hydrogen (Na, K, Ca, Mg, Al) is never discharged and hydrogen gas comes off instead;
(ii) at the anode, a concentrated halide solution gives the halogen (Cl2, Br2); with no halide (or a very dilute one) oxygen comes off from the water;
(iii) SO42− and NO3− are spectators, never discharged, so they always leave oxygen at the anode.