See Our New JEE Book on Amazon
Ampere's circuital law states that the line integral of the magnetic field around a closed loop C is equal to $\mu_0$ times the total electric current passing through the loop i.e., \begin{align} \oint_{C}\vec{B}\cdot\mathrm{d}\vec{l}=\mu_0 I_{enc} \end{align}
Ampere's circuital law is very useful in problems having symmetry. It can be used to find magnetic field of an infinitely long straight conductor, a long solenoid and a toroid.
Problem (IIT JEE 1993): A current $I$ flows along the length of an infinitely long, straight, thin-walled pipe. Then the magnetic field
Solution: By symmetry, the magnetic field inside the pipe is circumferential. Take a circular loop of radius $r$ with centre along the axis of the pipe. By symmetry, the magnitude of magnetic field is same throughout the loop.