give example of exception of oxidation number
The oxidation number of halogens in a compound is -1, except when that element is combined with one having a higher electronegativity.
The oxidation number of Cl is -1 in HCl, but the oxidation number of Cl is +1 in HOCl as oxygen is more electronegative than chlorine.