Answer the question in detail:
Why does a current-carrying conductor produce a magnetic field?
When flows through a conductor, it produces a magnetic field around it.
This magnetic field exists .
The strength of the magnetic field depends on the passing through the conductor.
A placed near the conductor gets deflected, showing the presence of the magnetic field.