WHAT CAUSES DEFLECTION OF THE COMPASS NEEDLE WHEN CURRENT FLOWS THROUGH A WIRE NEARBY ?
A current carrying wire produces magnetic field around itself. If a magnetic needle is taken in the magnetic field, it experience a magnetic force.This is the cause compass needle deflection when current flow through the wire nearby.