3. Given that $a$ and $b$ are integers, $c$ is a prime number, and
$$
(a+b)^{4}=c-|a-b| \text {. }
$$

Then the number of ordered pairs $(a, b)$ is $(\quad)$.
(A) 2
(B) 4
(C) 6
(D) 8
3. C.

From the given, we have $(a+b)^{4}+|a-b|=c$.
Since $a+b$ and $a-b$ have the same parity, the left side of the equation is even. Therefore, $c$ is the even prime number 2.
$$
\begin{array}{l}
\text { Hence }(a+b, a-b) \\
=(0,-2),(0,2),(1,-1),(1,1), \\
\quad(-1,-1),(-1,1) .
\end{array}
$$

Therefore, the ordered pairs $(a, b)$ have a total of 6 solutions.