Why does the needle of a magnetic compass deflect when it is kept beside a current-carrying wire?
Magnetic compass:
A device for identifying direction upon that Earth's surface using a magnetic pointer that aligns with said Earth's magnetic field is called a magnetic compass.
Explanation: