Let $f:X\to Y$ and $g:Y\to Z$ be maps of topological spaces.
Assume that the composition $g\circ f$ is continuous and that $f$ is continuous.
Is $g$ necessarily continuous?
If this is not true in general, is it true under some hypotheses on $X$, $Y$ or $Z$?
Reversely, assume that $g\circ f$ is continuous and $g$ is continuous. Is $f$ continuous?
This is not homework. It's just something I was wondering about.