The gas evolved when potassium nitrate crystals are heated with concentrated sulphuric acid is nitrogen dioxide (NO2).
H2SO4+KNO3→HNO3+KHSO4
The formed nitric acid dissociates to give nitrogen dioxide, water and oxygen gas.
The equation of dissociation of nitric acid is as follows:
4HNO3→O2+2H2O+4NO2