First, you must write out the balance combustion reaction in order to know how the carbon and oxygen are combined. Assuming we are starting with elemental carbon and burning it with pure oxygen, the equation is:
So, every mole of carbon requires one mole of oxygen and produces one mole of carbon dioxide.
Therefore we require 0.15 mole of carbon.
0.15 mol * 12 g/mol = 1.8g carbon.
An alternative way to calculate the amount is to look at the product mass only.
This alternative procedure may not work with more complex reactions.