Final answer:
NaCl is the compound that exhibits both ionic and covalent bonding; the ionic bond between Na+ and Cl-, and the covalent character within the polyatomic ions it often associates with.
Step-by-step explanation:
The compound that exhibits both ionic and covalent bonding among the listed options is NaCl. Sodium chloride (NaCl) has an ionic bond between the sodium ions (Na+) and chloride ions (Cl−). However, between Na+ and the Cl−, the electron is not shared but transferred from Na to Cl, making the bond ionic rather than covalent. In contrast, compounds such as H2O (water), CO2 (carbon dioxide), and CH4 (methane) involve covalent bonding, where electrons are shared between non-metal atoms.