Solution:
Magnetic field at centre of solenoid \(=\mu_{0} n I\)
$$
\begin{aligned}
&n=\frac{N}{L} \\
&=\frac{100}{50 \times 10^{-2}} \\
&=200 \mathrm{tums} / \mathrm{m} \\
&I=2.5 \mathrm{~A}
\end{aligned}
$$
On putting the values,
$$
\begin{aligned}
&B=4 \pi \times 10^{-7} \times 200 \times 2.5 \\
&=6.28 \times 10^{-4} T
\end{aligned}
$$