Oxidation state is equal to the number of valence electrons that carbon is supposed to have, minus the number of valence electrons around carbon in our drawings, so let's count them up after we've accounted for electronegativity.
We move on to another molecule, so CH2O, this is formaldehyde, and we know that oxygen usually has an oxidation state of minus two, and we have one oxygen for a total of minus two down here. Hydrogen usually has an oxidation state of plus one, and we have two of them for plus two.
Iron (II) carbonate is FeCO₃, while iron (III) carbonate is Fe₂ (CO₃)₃. In either case, the question involves the oxidation number of C in CO₃²⁻. The oxidation number of each O is -2, so the total oxidation number of O is -6 The oxidation number of C must be +4, to make the oxidation number of the ion the same as its charge.
Draw the structure, then break every bond. Assign both electrons in each bond to the more electronegative atom of that bond. If the atoms are the same (eg a C-C bond) then assign 1 electron to each. Then subtract how many electrons have been given to each atom from the valence electrons their neutral atom would have, that's the oxidation state.
So compounds like FeO and Fe₂O₃ were called ferrous and ferric oxides, while SnO and SnO₂ were called stannous and stannic oxides. In 1919 Alfred Stock suggested that the names should use Roman numerals in parentheses, to make the names iron (II), iron (III), tin (II), and tin (IV) oxides.
You will need to considered the electronically differences , because between the two atoms one will be more delta postive/negative, which could alter how reactions occur (making one carbon a better electrophile than the other) .