The Lewis structure of carbon dioxide shows that the carbon atom is surrounded by four electrons, two from each oxygen atom. This satisfies the octet rule for carbon, which states that carbon atoms tend to have eight electrons in their outer shell. The two oxygen atoms each have six electrons in their outer shell, also satisfying the octet rule.
The double bonds between the carbon and oxygen atoms in carbon dioxide are strong and stable, making it a relatively inert molecule. This is why carbon dioxide gas is commonly used as a fire extinguisher, as it can displace oxygen and prevent combustion. Carbon dioxide is also used in the production of carbonated beverages, as it dissolves in water to form carbonic acid, which gives these beverages their tangy flavor.