Answer: when carbon is heated in air carbon dioxide is formed, so is incomplete combustion which results in carbon monoxide.
Explanation: but when carbon dioxide reacts with more oxygen carbon monoxide is formed i guess.
I AM A BIT SURE BUT HOPE THIS HELPSSSS!!!!