Step 1: Magnetic moment of a loop.
The magnetic moment \( M \) of a current-carrying loop is given by:
\[
M = I \times A
\]
where \( I \) is the current passing through the loop, and \( A \) is the area of the loop.
Step 2: Calculate the area of both loops.
For a square loop with side \( a \), the area is:
\[
A_{\text{square}} = a^2
\]
For a circular loop with radius \( r \), the area is:
\[
A_{\text{circle}} = \pi r^2
\]
Step 3: Relationship between the lengths of the loops.
The length of the square loop is \( 4a \), and the length of the circular loop is \( 2\pi r \). Since the total length of the wire is the same for both loops, we have:
\[
4a = 2\pi r \quad \Rightarrow \quad a = \frac{\pi r}{2}
\]
Step 4: Calculate the ratio of magnetic moments.
The magnetic moment of the square loop is:
\[
M_{\text{square}} = I \times a^2 = I \times \left( \frac{\pi r}{2} \right)^2 = \frac{\pi^2 r^2 I}{4}
\]
The magnetic moment of the circular loop is:
\[
M_{\text{circle}} = I \times \pi r^2 = I \times \pi r^2
\]
Thus, the ratio of magnetic moments is:
\[
\frac{M_{\text{square}}}{M_{\text{circle}}} = \frac{\frac{\pi^2 r^2 I}{4}}{\pi r^2 I} = \frac{\pi}{4}
\]
Step 5: Conclusion.
Thus, the ratio of the magnetic moment of the square loop to that of the circular loop is \( \frac{\pi}{4} \), which corresponds to option (C).