1. Given the equation about $x$
$$
|| x-2|-| x+7||=k
$$

has two real roots. Then the range of $k$ is ( ).
(A) $k \geqslant 0$
(B) $0 \leqslant k<9$
(C) $0<k<9$
(D) $0<k \leqslant 9$
- 1. C.

From the problem, we know $k \geqslant 0$. Then
$|x-2|-|x+7|= \pm k$.
Let $|x-2|-|x+7|=p$. Then
$$
p=\left\{\begin{array}{ll}
-9, & x \geqslant 2 ; \\
9, & x \leqslant-7 ; \\
-2 x-5, & -7<x<2 .
\end{array}\right.
$$

Therefore, when $-9<p<9$,
$$
|x-2|-|x+7|=p
$$

has a unique solution.
Thus, $-9<k<9,-9<-k<9$.
Also, $k \neq-k$, and $k \geqslant 0$, so $0<k<9$.