3. Given that $x_{1}, x_{2}$ are the roots of the equation $x^{2}+k x+p=0$, and $x_{3}, x_{4}$ are the roots of the equation $x^{2}+k x+q=0$. Then $\left(x_{1}-x_{3}\right)\left(x_{2}-x_{4}\right)\left(x_{1}-x_{4}\right)\left(x_{2}-x_{3}\right)=$ ( ).
(A) $(p+q)^{2}$
(B) $p^{2}+q^{2}$
(C) $(q-p)^{2}$
(D) $q^{2}-p^{2}$
3. C.

From the problem, we know $x_{1}+x_{2}=-k, x_{1} x_{2}=p$,
$$
\begin{array}{l}
x_{3}+x_{4}=-k, x_{3} x_{4}=q, \\
x_{1}^{2}+k x_{1}+p=0, x_{2}^{2}+k x_{2}+p=0 .
\end{array}
$$

Then $\left(x_{1}-x_{3}\right)\left(x_{2}-x_{4}\right)\left(x_{1}-x_{4}\right)\left(x_{2}-x_{3}\right)$ $=\left[x_{1}^{2}-\left(x_{3}+x_{4}\right) x_{1}+x_{3} x_{4}\right]$.
$$
\begin{aligned}
& {\left[x_{2}^{2}-\left(x_{3}+x_{4}\right) x_{2}+x_{3} x_{4}\right] } \\
= & {\left[-k x_{1}-p-(-k) x_{1}+q\right] . } \\
& {\left[-k x_{2}-p-(-k) x_{2}+q\right] } \\
= & (-p+q)(-p+q)=(q-p)^{2} .
\end{aligned}
$$