Let $C[0,1]$ denote the ring of continuous function on compact set $[0,1]$.
I have already checked that this ring is not an integral domain.
$$f(x)=\begin{cases}0&\text{if}\;\;\;0\leq x<\frac{1}{2}\\2x-1&\text{if}\;\;\;\frac{1}{2}\leq x\leq 1\end{cases}$$
$$g(x)=\begin{cases}-2x+1&\text{if}\;\;\;0\leq x<\frac{1}{2}\\0&\text{if}\;\;\;\frac{1}{2}\leq x\leq 1\end{cases}$$
Lemma: We can show that if $R $ is an integral domain then $0 $ is the only nilpotent element in the ring.
Proof: Let $a\in R, a\neq 0$ and suppose $a^n=0$ for some $n>1$
$$a^n=aa^{n-1}=0$$ which imply that $a=0$ as $R$ is integral domain.
Main Question
Since $R=C[0,1]$ is not an integral domain, should I expect some nilpotent elements. I am not able to construct such element.
May be I am wrong and this ring work as an counterexample to the converse of the above lemma.
There are no nilpotent elements (save the zero element): $C[0,1]$ is a reduced ring.
The proof is immediate: if $f\in C[0,1]$ and $f^n=0$, then $f(x)^n=0$ for all $x\in[0,1]$, so that $f(x)=0$ for all $x\in[0,1]$.