What is the oxidation number of carbon in CO2?
+4
+4
Oxidation number of individual atoms add up to provide the final oxidation number of the compound. For stable compounds the oxidation number is zero.
Carbon has +4 as oxygen has two atoms with -2 oxidation number which results in zero final oxidation number.
CO2
(+4) + [(-2) * (2)] = (+4) + (-4) = 0