3. A student obtained a perfect square when substituting a natural number into one of the quadratic functions $f_{k}(x)(k=1,2,3,4)$. The function he used is $(\quad)$.
(A) $f_{1}(x)=x^{2}+5 x+7$
(B) $f_{2}(x)=x^{2}+7 x+10$
(C) $f_{3}(x)=x^{2}+9 x+18$
(D) $f_{4}(x)=x^{2}+11 x+2$
3.D.

When $x$ is a natural number, we have
$$
\begin{array}{l}
(x+2)^{2}<x^{2}+5 x+7<(x+3)^{2}, \\
(x+3)^{2}<x^{2}+7 x+10<(x+4)^{2}, \\
(x+4)^{2}<x^{2}+9 x+18<(x+5)^{2} .
\end{array}
$$

That is, when $x$ is a natural number, the functions $f_{1}(x)$, $f_{2}(x)$, and $f_{3}(x)$ all lie between two consecutive square numbers, so they cannot be square numbers. Therefore, the only function that could possibly be a square number is $f_{4}(x)=x^{2}+11 x+2$.
Note: When $x=23$, $f_{4}(23)=784=28^{2}$.