The correct option is B HCl<NH4Cl<NaCl<NaCN
NaCN is a salt of a strong base and weak acid, has the highest pH. HCl is a strong acid and has the lowest pH. NaCl is a neutral salt - strong base and strong acid mix to give this and has a pH of 7. NH4Cl is a salt of a strong acid and a weak base, has a pH less than 7.
∴ pH:HCl<NH4Cl<NaCl<NaCN