Final answer:
NH4Cl (D) is the compound that contains both ionic and covalent bonds, due to the covalent bonding within the NH4+ ion and the ionic bond between NH4+ and Cl-.
Step-by-step explanation:
The compound that contains both ionic and covalent bonds is D. NH4Cl. Ammonium chloride (NH4Cl) consists of the ammonium cation (NH4+), where the atoms are bonded covalently, and the chloride anion (Cl-), setting up an ionic bond between the two. In contrast, CO2 (A) is purely covalent, PbO2 (B) contains a metal and oxygen bonded ionically, and CH3COOH (C) contains only covalent bonds.
Some compounds contain both types of bonds as seen in NH4Cl. In this compound, nitrogen and hydrogen atoms share electrons in a covalent bond within the NH4+ ion, but the NH4+ ion as a whole forms an ionic bond with the Cl- ion.