In a carbon dioxide (CO2) molecule, there are two oxygen atoms bonded to a central carbon atom. Each oxygen atom shares two electrons with the carbon atom, forming two double bonds. Here is the electron dot and cross diagram of CO2:
O = C = O
In this diagram, the "=" represents a double bond between the carbon atom and each oxygen atom. Each oxygen atom has two lone pairs of electrons around it.