When electricity is passed through a concentrated solution of sodium chloride then it decomposes to form sodium hydroxide(caustic soda), chlorine and hydrogen.
2NaCl(aq) + 2H2O (electricity)--------- 2NaOH(aq) + Cl2(g) + H2(g)
The two products- chlorine and hydrogen, formed during chlor-alkali process combine to form hydrochloric acid.