When an electric current flows through a wire, it produces a magnetic field around the wire.A compass needle aligns itself along the direction of the magnetic field it experiences.Normally, the needle points North-South due to Earth’s magnetic field.When the current is switched ON, the magnetic field of the wire interacts with Earth’s field, causing the needle to deflect from its North-South position.This experiment shows that electric current produces a magnetic effect.