Is the Cantor set a subset of rational numbers, and is it countable or uncountable?

"The elements in the Cantor set are the end points of all the intervals in $E_n$..." This is your mistake. This isn't true. In fact, written in ternary expansion, the elements of the Cantor set are precisely those elements in $[0,1]$ with a ternary expansion consisting of $0$'s and $2$'s (where we note $0.01=0.00\bar{2}\in\mathcal{C}$, but $0.0101\notin\mathcal{C}$, for example). Using this fact, it isn't hard to show that $\frac{1}{4}\in\mathcal{C}$ but $1/4$ is not an endpoint of any interval.


All of the endpoints are indeed in the Cantor set.

But because any intersection of closed sets is again closed, this means that the Cantor set is closed as well -- in fact, it is the closure of the set of all points.

In particular, this means that the limit of any sequence of endpoints, if it exists, must also be in the Cantor set. In fact, it turns out that every point of the Cantor set is of this form.

To see that $1/4$ must be in the cantor set, observe it is the limit of the sequence $s_n$ defined by

$$ s_n = \sum_{i=1}^n \frac{2}{9^i} $$

If you draw the picture of the first few $E_i$, you'll see that $1/4$ is alternately in the left and right thirds of its interval, so it never gets removed.

To see that this continues forever, note this picture is self-similar: the location of $1/4$ in the interval $[2/9, 1/3]$ is proportionally in the same place as it is in $[0,1]$.