R with usual topology
R\{0} .....
Z with usual topology
Z\{0} ....
Q with usual topology
in the usual topology on these guys, compact means the set is closed and bounded. so i will leave you to wrestle with that
as for connectednessNote that $\displaystyle \mathbb{R} \backslash \{ 0 \} = (- \infty, 0) \cup (0, \infty)$
note that $\displaystyle \mathbb{Z} \backslash \{ 0 \} = \{ x \mid x \in \mathbb{Z},~x \in (-\infty, -1] \cup [1, \infty) \}$Z with usual topology
Z\{0} ....
can you express this set as two disjoint open sets?Q with usual topology