It depends on what the carbon is reacting with. Some reactions are discussed below -
With oxygen, carbon gets oxidized to carbon dioxide.
C+O2=CO2
Reaction of carbon with water
Carbon, either as graphite or diamond does not react with water under normal conditions. Under more forcing conditions, the reaction becomes important. In industry, water is blown through hot coke. The resulting gas is called water gas and is a mixture of hydrogen (H2,50%), carbon monoxide (CO,40%), carbon dioxide (CO2,5%), nitrogen and methane (N2+CH4,5%). It is an important feedstock gas for the chemical industry.
C+H2O→CO+H2
Reaction of carbon with the halogens
Graphite reacts with fluorine, F2, at high temperatures to make a mixture of carbon tetrafluoride, CF4, together with some C2F6 and C5F12.
C(s)+excess F2(g)→CF4(g)+C2F6+C5F12