A carbon–oxygen bond is a polar covalent bond between carbon and oxygen. Oxygen has 6 valence electrons and prefers to either share two electrons in bonding with carbon, leaving the 4 nonbonding electrons in 2 lone pairs :O: or to share two pairs of electrons to form the carbonyl functional group.