A magnetic field is created ____________.
a. when a compass is placed next to a wire.
b. when an electric current flows through a wire.
c. when wire is wrapped around an iron core.
d. when wire is twisted into a loop.
Magnetic fields are created due to charges in motion. Current by definition is the amount of charge flowing over time. Therefore, the answer is B, when an electric current flows through a wire.