Among the following cases, which kind of magnetic field production is found similar to the magnetic-field of a bar magnet?
1
An infinitely long wire carrying current.
2
A solenoid of finite length carrying current.
3
A rectangular loop carrying current.
4
A circular loop carrying current.