Prove/disprove: If $R'$ is a subring of $R$ and $R'$ is a domain, then $R$ is a domain. I'm trying to prove/disprove the following statement.
Given that $R$ is a commutative ring and that $R'$ is a subring of $R$, the following holds: If $R'$ is a domain, then $R$ is a domain. 
I personally think that this is not true.
Take $C(\mathbb{R})$ and functions $f : \mathbb{R} \to \mathbb{R}$. If those functions represent ring $R$ then subring $R'$ has functions $f : \mathbb{R} \to \mathbb{R}_{\geq 0}$. I believe this subring $R'$ has no zero divisors and that therefore $R'$ is a domain, while $R$ itself is not a domain.
I'm not sure if I'm looking at this correctly, so I would very much like some help with checking what I've done is correct.
 A: Yes, $C(\mathbb R)$ is definitely not a domain.
But the subset of functions from $\mathbb R\to \mathbb R_{\geq 0}$ is not a domain either. Consider the function $f$ which is zero on $(\infty, 0]$ and $1$ elsewhere, and the function $g$ which is zero on $[0,\infty)$ and $1$ elsewhere. The product of the two is zero.  Even if you change to continuous functions, you have a similar problem.
Actually I do not even think this subset has additive inverses, so that's another strike against it.
But more simply, you can identify the constant functions in $C(\mathbb R)$ with $\mathbb R$, and that is certainly a domain.
Another simpler example is $\mathbb R[x]/(x^2)$, which contains a copy of $\mathbb R$.
And if you don't require the rings to share identity, then $R=D\times D$ and $R'=D$ is another simple example.
A: I think you can consider about $R =k [x,y]/xy$ where $k$ is a field and naturally a domain and $R$ is not a domain.
If the addition is the normal one, I mean, $(f+g)(x)=f(x)+g(x)$ $R'$ is not a ring.
