How to calculate the amount of substances product produces from the masses and amounts of starting materials?
From the equation, 
$$\ce{C + O2 -&gt; CO2},$$
we can see that one mole of $\ce{C}$ reacts with one mole of $\ce{O2}$.

Therefore, let us calculate the amount of each reactant present.

The amount of $\ce{C}$ is already given: $n(\ce{C}) = \pu{1 mol}$.

The molar mass of $\ce{O2}$ is $M(\ce{O2}) = \pu{32 g//mol}$, so $\pu{16 g}$ of $\ce{O2}$ are $\pu{0.5 mol}$.

Since one mole of $\ce{C}$ only reacts with one mole of $\ce{O2}$, there remain $\pu{0.5 mol}$ of unreacted $\ce{C}$, while $\pu{0.5 mol}$ of $\ce{C}$ react with $\pu{0.5 mol}$ of $\ce{O2}$.

In formal terms, oxygen is called the limiting reactant as it limits the amount of product formed.

From the equation, one mole of $\ce{CO2}$ is produced per each mole of $\ce{C}$. Therefore, $\pu{0.5 mol}$ of $\ce{CO2}$ is produced.