TITLE: Can real numbers be dense in complex numbers for some topology?
QUESTION [7 upvotes]: I am looking for a topology such that R is dense in C .
I was thinking I can construct a surjective continuous function f : R → C such that the image of Q is R.

REPLY [7 votes]: The Zariski topology is an important “real-world” topology having this property. In a complex affine space (maybe not just a complex line), the Zarisiki topology is the topology whose closed sets are the zeroes of polynomial functions. In dimension 1 the closed sets in the Zariski topology are just the finite subsets, together with the full complex line, which indeed makes the real line a dense subset.
The Unitarian trick is a great example of an argument involving distinct topologies on some space (in this case the Zariski topology and the Euclidean topology) to prove a meaningful theorem.
There is a lot of other topologies making the real line a dense subset of the complex plane, but only a few of them are interesting. Some already quoted the coarse topology. If you are interested in producing a lot of rather artificial examples, take any map $f$ from the complex plane onto a finite set $F$, so that the restriction of $f$ to the real line is also onto. The set of preimages through $f$ of the poert set of $F$ are the closed sets of a topology on the complex plane where the real line is dense.