Gaseous carbon monoxide reacts according to the balanced equation. If a total of 1040 kJ of heat is generated in the reaction as written, how many grams of CO2 are produced?

enthalpy=-566kJ
2 CO(g) + O2(g) → 2 CO2(g)