Solution: To determine which compound contains both ionic and covalent bonds, we need to analyze the bonding in each given compound.
- NaCl: Sodium chloride consists of sodium ions (Na+) and chloride ions (Cl-). The bond is purely ionic, as electrons are transferred from sodium to chlorine.
- NH3: Ammonia features covalent bonds between nitrogen and hydrogen atoms. All electrons are shared, resulting in covalent bonding only.
- CaCO3: Calcium carbonate contains ionic bonds between calcium ions (Ca2+) and carbonate ions (CO32-). Within the carbonate ion, carbon and oxygen atoms are bonded covalently.
- CH4: Methane consists of covalent bonds between carbon and hydrogen atoms.
In CaCO3, the presence of ionic bonds between Ca2+ and CO32- and covalent bonds within the CO32- ion indicates that it contains both types of bonds. Therefore, the answer is CaCO3.