For the reaction C + O2 = CO2, if 3 grams of carbon react with the oxygen, how many grams of carbon dioxide are produced?