The correct option is D Sodium chloride
Sodium chloride is the only compound formed by ionic bonding among the given options. Water, carbon dioxide and hydrogen chloride are formed by covalent bonding. As compounds formed by ionic bonding are more denser than that of compounds formed by covalent bonding, sodium chloride will have the highest density among water, carbon dioxide, hydrogen chloride and sodium chloride.