Transformer is a device which gives AC only. Because it does not work on DC. It can only work in AC. Direct current doesn’t have a variable magnetic field induced if fed through the primary winding of a transformer. Thus, only a constant magnetic field will act on the secondary and shall not induce any voltage across the terminals of the same. So, it gives AC voltage only.