There are two possible parallel reactions:
\begin{align}
\ce{2 C + O2 &-> 2 CO}\\
\ce{C + O2 &-> CO2}
\end{align}
The latter reaction can run in a single step, or as a series $\ce{2 C + O2 -> 2 CO}$ and $\ce{2 CO + O2 -> 2 CO2}$.
$\ce{C}$ reacts with $\ce{O2}$ in molar ratio 2:1 or 1:1. If the initial ratio is between 2:1 and 1:1, there is possible that both reactant are spent, forming $\ce{CO + CO2}$ mixture. There is obviously also possibility the reaction does not complete and some of one or both reactants willremain.
But if the $\ce{C : O2}$ ratio is less than 1:1, than some $\ce{O2}$ will remain even if all $\ce{C}$ is spent. OTOH, if the $\ce{C : O2}$ ratio is more than 2:1, than some $\ce{C}$ will remain even if all $\ce{O2}$ is spent.
Many chemical tasks are trivial, if one does not seek for chemistry black magic everywhere. Compare it with this non-chemistry task:
Children get each 1 or 2 apples as a snack for a trip. If there are more than twice apples as children, some apples would remain, If there is less apples than children, some children will not get any apple.