A wire carrying current has the shape as shown in adjoining figure.
Linear parts of the wire are very long and parallel to X-axis while semicircular portion of radius is lying in plane. Magnetic field at point O is [2015]

(1)

Given situation is shown in the figure.
Parallel wires 1 and 3 are semi-infinite, so magnetic field at O due to them
Magnetic field at O due to semi-circular arc in YZ-plane is given by
Net magnetic field at point O is given by