21. The set $S$ is constructed in the following way: initially, $S=\{0,10\}$. If $x$ is a root of some polynomial
$$
a_{n} x^{n}+a_{n-1} x^{n-1}+\cdots+a_{1} x+a_{0}\left(n \geqslant 1, a_{i} \in S\right)
$$

then $x$ is added to the set $S$. This process is repeated until no more elements can be added to the set $S$. At this point, the set $S$ has ( ) elements.
(A) 4
(B) 5
(C) 7
(D) 9
(E) 11
21. D.

Initially, $S=\{0,10\}$.
$10 x+10$ has a root $x=-1$, at this point,
$S=\{-1,0,10\}$;
$-\sum_{i=1}^{10} x^{i}+10$ has a root $x=1$, at this point,
$S=\{-1,0,1,10\}$;
$x+10$ has a root $x=-10$, at this point,
$S=\{-10,-1,0,1,10\}$;
$x^{4}-x^{2}-x-10$ has a root $x=2$, at this point,
$S=\{-10,-1,0,1,2,10\}$;
$x^{4}-x^{2}+x-10$ has a root $x=-2$, at this point,
$S=\{-10,-2,-1,0,1,2,10\}$;
$2 x-10$ has a root $x=5$, at this point,
$S=\{-10,-2,-1,0,1,2,5,10\}$;
$2 x+10$ has a root $x=-5$, at this point,
$$
S=\{-10,-5,-2,-1,0,1,2,5,10\} \text {. }
$$

At this point, no more elements can be added to the set $S$.
In fact, by
$$
\begin{array}{l}
a_{n} x^{n}+a_{n-1} x^{n-1}+\cdots+a_{1} x+a_{0}=0 \\
\Rightarrow x\left(a_{n} x^{n-1}+a_{n-1} x^{n-2}+\cdots+a_{1}\right)+a_{0}=0 \\
\Rightarrow x\left(a_{n} x^{n-1}+a_{n-1} x^{n-2}+\cdots+a_{1}\right)=-a_{0},
\end{array}
$$

where $a_{i} \in S$, thus, $x$ is a factor of $a_{0}$.
Since $a_{0} \in S$, $x$ must be a factor of some element in the set $S$.
And all factors of 10 are already in the set
$$
\{-10,-5,-2,-1,0,1,2,5,10\}
$$

Therefore, no other elements can be added to this set, and at this point, the set $S$ has 9 elements.