Ionic Compounds
In ionic compounds, there is an exchange of electrons between a metal and a non-metal.
Options:
NaCl
O₂
H₂O
CO₂
Using the criteria above, we can identify that NaCl is the ionic compound. Na donates an electron to Cl and becomes a cation while Cl takes an electron and becomes an anion. Na is a metal whereas Cl is a non metal.
The other listed options have covalent bonding, where electrons are being shared, not transferred.