Carbon can reduce the oxides of metals that are less reactive than it. Zinc is less reactive than sodium, magnesium, and aluminum. Therefore, ZnO can be reduced by carbon in a process called smelting ($ZnO + C \rightarrow Zn + CO$).