Why does a compass needle get deflected when brought near a barmagnet?
A compassneedle is a small bar magnet. When it is brought near a bar magnet,its magnetic field lines interact with that of the bar magnet. Hence,a compass needle shows a deflection when brought near the bar magnet.