A colourless gas with a pungent smell is evolved when dilute hydrochloric acid is added…