Let $S\subset\mathbb R$ be a $G_\delta$ set. A variation on the construction of the Thomae function (which is discontinuous on the rationals and continuous elsewhere) shows that there is a function $\mathbb R\to\mathbb R$ that is continuous exactly on $S$.
I'm trying to find a published reference for this result. Note: the wikipedia page on Thomae's function mentions an equivalent result, phrased in terms of $F_\sigma$'s, without giving a reference. So it's clear the result is well-known; but I'd like a reference in an article or book (even as an exercise) rather than just the wikipedia page.