To address the problems with your reasoning:
In the case of (a), you say that the function does not extend because $\mathbb Z$ is not dense. However, the density of the subset is only required for the extension to be unique. Think of it this way: the more points you specify, the harder it is to fit a function to them. If you specify on a dense set, you've so many values, you're left with no choice as to what happens elsewhere.
Note that specifying values on a dense set doesn't mean there is an extension, only that it is unique if it exists: the function $f(x)=\begin{cases}0 &\mbox{if }x^2 < 2 \\ 1 &\mbox{if }x^2 > 2\end{cases}$ is continuous on $\mathbb Q$ but has no continuous extension to $\mathbb R$. By contrast, given a function on a discrete set like $\mathbb Z$ (i.e. very much smaller than dense!) you can always extend because you've got space around every point in which you can do whatever you like. In fact, it is sufficient (though not necessary) that your set is closed: see the Tietze extension theorem.
Your reasoning in (b) fails because, although you correctly identify that there is a closed set with an open pre-image, this is not in fact a problem because closed sets can also be open and vice versa. In particular, the whole space ($[0,1]$ or $D\setminus\{(0,0)\}$) is always both open and closed.
Your reasoning in (c) is correct.