4. If $a, c$ are both positive integers, and the equations $x^{2}+a x+$ $18=0$ and $x^{2}-a x+c=0$ have a common prime root. Then the value of $c$ is $(\quad$.
(A) -18
(B) -26
(C) -26 or -36
(D) 26 or 36
4.C.

Since $18=2 \times 3^{2}$, and the equation $x^{2}+a x+18=0$ has a prime root, this prime root can only be 2 or 3.

When the prime root is 2, we have $2^{2}+2 a+18=0$ and $2^{2}-$ $2 a+c=0$. Adding these two equations gives $c=-26$.

When the prime root is 3, we have $3^{2}+3 a+18=0$ and $3^{2}-$ $3 a+c=0$. Adding these two equations gives $c=-36$.