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

Hint: use limits, the density of $\Bbb Q$, and the fact $f$ is continuous.
