Ionic bonds are formed when there is a complete transfer of electrons from one atom to another, resulting in the formation of positively and negatively charged ions. Carbon dioxide (CO2) is a covalent molecule, meaning that the atoms share electrons rather than transferring them completely. Covalent bonds are typically formed between atoms with similar electronegativities, which is the case for carbon and oxygen in CO2.