Can we construct funtion $f$ non-constant and continuous on $\mathbb{R}$, $f$:$\mathbb{R}\rightarrow\mathbb{Q}$.
Is that right "By intermediate value theorem, there exist irrational number between two images of $f$ (say $f$(m)>$f$(n) where m,n belongs to $\mathbb{R}$) since $f$ is non constant , so that there is no function with these properties."
Intermediate value theorem, not mean value theorem. And the point is not just that there is an irrational number $y$ between $f(m)$ and $f(n)$, but that there is $x$ with $f(x) = y$.