The transformer works on the principle of mutual induction, for which current in one coil
must change uniformly. If dc supply is given, the current will not change due to constant supply and transformer will not work.
Practically winding resistance is very small. For dc, the inductive reactance XL is zero as dc has no frequency. So total impedance of winding is very low for dc. Thus winding will draw very high current if dc supply is given to it. This may cause the burning of windings due to extra heat generated and may cause permanent damage to the transformer.
There can be saturation of the core due to which transformer draws very large current from the supply when connected to dc.
Thus dc supply should not be connected to the transformers.