Answer
CaO: Ionic bond; CO2: Covalent bonds.
The difference occurs because Calcium (Ca) is a metal, and Carbon (C) is a nonmetal, like Oxygen;
Work Step by Step
Ca and O have very different electronegativity, so they form ionic bonds, and C and O have a lower diference, so they form covalent bonds.