Gun powder is a mixture of potassium nitrate (serve as oxygen source), sulphur (serve as the fuel) and charcoal (serve as the carbon source). When bullet is fired, the gun powder explodes by the combustion of its constituents. The equation showing the combustion of the gun powder is as follows:
KNO3 + S + 3C → K2S + N2 + 3CO2