well if c is 0 it is pretty easy application of definitions because both of the piecewise functions converge to 0 at 0, so you can just choose the smaller of the two deltas to get it within any given epsilon.
For the other direction, I suggest a proof by contradiction. That is is say c is not 0. Anywhere else on the real line it is pretty clear that if you took epsilon to be say |c|/3 there is no way you can choose a delta small enough to ensure this function is continuous there. I think |c|/2 works actually, but better safe than sorry in my opinion.
Oh I should mention it is important that both the rationals and irrationals are dense, so any delta ball will contain points from both pieces.