Can we apply ampere's law for a current carrying circular loop 
They used the ampere law to calculate magnetic field by a toroid ( assuming perfectly circular coils provinding symmetry and neglecting effects due to helical nature) whis is $μ_0ni$(where $n$ is no of loops per unit length and $i$ is the current flowing in toroid)  inside the toroid and elsewhere 0. i can easily verify the law for a straight long wire but not able to do it for a ring. 
 A: The current carrying loop that you have shown is different from the loop in the book as in current flows along the loop in your picture whereas it flows around the loop (like a curved helix) in the second picture.
Ampere's law is valid for both the cases.
A: Ampere's Law is always valid (ignoring displacement current for now). However, you can only use it to determine the field of a configuration when certain symmetries are present. This is why you only see it used on 


*

*Cylinders (Like straight wires)

*Planes (Current sheets)

*Straight solenoids

*Torroidal solenoids


The reason we can only use Amepere's law to determine the field in these specific systems is because we can make symmetry arguments that allows us to move the field term $B$ out of the line integral.
The problem with your drawing of an Amperian loop that is concentric with a section of the current loop is that the field is not behaving in a nice way around your Amperian loop. It changes magnitude as well as direction relative to the loop. Compare this to the torroidal solenoid where we can argue that the field has a constant magnitude and always points in the same direction of our Amperian loop as we move around the loop. In your wire case, there would be no way to take the $B$ term out of your line integral then. Ampere's law cannot be used to determine the field along your Amerpian loop here.
