$+\sqrt{x-y}=a$ has ( ) solutions.
(A) 2
(B) 4
(C) 5
(D) infinitely many

The text above is translated into English, keeping the original text's line breaks and format.
2. (C).

Since $x, y$ are integers, $x+y$ and $x-y$ have the same parity, and $\sqrt{x-y}$ can only be an integer, then $a=2$. Therefore, we have
$$
\begin{array}{l}
\left\{\begin{array}{l}
x+y=0, \\
x-y=4,
\end{array},\left\{\begin{array}{l}
x+y=1, \\
x-y=1,
\end{array},\left\{\begin{array}{l}
x+y=2, \\
x-y=0
\end{array}\right.\right.\right. \\
\left\{\begin{array}{l}
x+y=-1, \\
x-y=1,
\end{array},\left\{\begin{array}{l}
x+y=-2 \\
x-y=0
\end{array}\right.\right.
\end{array}
$$

These are the integer solutions.
