A hydrogen chloride gas reacted with oxygen gas to yield water and chlorine gas. The…