Cardinality of $A=\{f: \mathbb R \to \mathbb R , f \text{ is continuous and} f(\mathbb Q) \subset \mathbb Q\}$

Find the cardinality of the set $A=\{f: \mathbb R \to \mathbb R , f \text{ is continuous and} f(\mathbb Q) \subset \mathbb Q\}$.

My attempt at a solution:

First I've noticed that $A \subset B=\{f:\mathbb R \to \mathbb R, f \space \text{is continuous}\}$. Since a continuous functions is determined by which values it takes at all the rational points of the domain, it's easy to see that $|B|=c^{\aleph_0}=c$. Now, I am trying to find a subset $C$ of $A$ such that $|C|=c$ but I am having a hard time finding this subset. Could anyone give me suggestions/hints to find this subset?


For $C$, you can restrict to functions $f$ that are continuous and piecewise linear, each piece having rational slope and points with integer coordinates as endpoints, and such that $f(\mathbb Z)\subseteq\{0,1\}$. Do you see how to proceed?


Hint: Let the values of $f$ at integers be a sequence of rationals converging to your favorite real number. Extend by line segments in between.