Let $f$ be continuous on the real numbers. Let $c$ be in real number with $f(x)=c$ for all $x$ in $\mathbb{Q}$. Show that $f(x)=c$ on $\mathbb{R}$. Can someone solve this question?

Let $f$ be continuous on $\mathbb{R}$. Let $c$ be in real number with $f(x)=c$ for all $x$ in $\mathbb{Q}$. 
  Show that $f(x)=c$ for all $x$ in $\mathbb{R}$.

thank you

You could look at it with sequences, but there is actually a cleaner (but more abstract) way to look at it.
Since $f$ is continuous and $\{c\}$ is closed, $f^{-1}(c)$ is a closed set. But that closed set contains $\Bbb Q$. Therefore... (what can you say about the closure of a dense subset of $\Bbb R$?)
