Prove that $f(x) = 0$ for all $x ∈ R$. Let $f(x)$ be a continuous function such that $f(r) = 0$ for all rational numbers r. Prove
that $f(x) = 0$ for all $x ∈ R$.

I feel like the following equivalent definition of continuity is very suitable here:
$$f \textrm{  is continuous}\ \iff f(\overline{M})\subset \overline{f(M)} \textrm{  for all}\ M\subset X $$ 
Now choose $M=\mathbb Q$ and you are done.
A proof of the above alternative definition of continuity can be found here.
