If you know the mass of carbon dioxide produced, you can use the percent composition to tell you the grams of carbon produced. Example, carbon dioxide is 27.3% carbon by mass. Therefore, 1 g of carbon dioxide contains 0.273g of carbon.
If you know the number of moles of carbon dioxide produced, you can use the molecular formula to tell you the grams of carbon. For example, carbon dioxide is CO2. That means one mole of carbon dioxide will contain one mole of carbon atoms and two moles of oxygen atoms.