(i) Dihydrogen reacts with chlorine give hydrogen chloride. Dihydrogen reduces chlorine into CI− ion and itself gets oxidized to H+ ion by chlorine to form hydrogen chloride.
H2 (g) + Cl2(g) → 2NCI(g)
(ii) Dihydrogen reacts with sodium to give sodium hydride. Dihydrogen is reduced by sodium to form NaH.
H2 (g) + 2Na(g) → 2NaH(s)