Assertion (a): Sodium, calcium, and magnesium are obtained by the electrolysis of their molten oxides.
Reason (r): These metals have more affinity for oxygen than carbon.