Here's a non-trivial example: the closure of the topologist's sine curve with the ends joined up.
If you want an explicit representation, take
$$
\{(x,y) : 0< x\leq 1, y = \sin(1/x) \} \bigcup \{(0,y): -1\leq y\leq 1\} \bigcup \{(x,0): -1\leq x\leq 0\} \bigcup \{(-1,y): -2\leq y\leq 0 \} \bigcup\{(x,-2): -1\leq x \leq 1\} \bigcup \{(1,y): -2\leq y\leq \sin(1) \}.
$$
I think it is worth giving a counterexample to the assertion : "continuous bijections are homeomorphisms".
The example is a rather simple one : the identity map is always a bijection. If you take two topologies on a set, one which is (strictly) coarser than the other, then the identity map will be continuous precisely in one direction : from the topology with more open sets to the one with less open sets. The other way, if you take a pullback of an open set which is not in the smaller topology, it won't be open in the smaller topology, hence continuity is not possible.
For example, take $\mathbb R$ with the usual topology, and say $\mathbb R$ with indiscrete/discrete topology with the identity map.
This is an example of a continuous bijection which is NOT a homeomorphism. There are conditions under which a continuous bijection is a homeomorphism (compact to Hausdorff), but it is not true in general.
It is true that $f^{-1}$ is closed : in fact, the fact that $f^{-1}$ carries closed sets to closed sets is equivalent to the continuity of $f$. Therefore, we do not expect this fact to be of help to us in the question. I will expand.
When we look at $[0,1]$ and $(0,1)$ as topological spaces, it is with the subspace topology derived from $\mathbb R$. That is, a description of "open" or "closed" in each of these topologies, is given by the intersection of the set with a set that is open or closed in $\mathbb R$ respectively.
For example :
$[0,1]$ is closed and open in the $[0,1]$ topology, because $[0,1] = [0,1] \cap \mathbb R$, and so it is the intersection of $[0,1]$ with a set both open and closed in $\mathbb R$.
Similarly, $(0,1)$ is both open and closed in the subspace topology derived from $\mathbb R$ (in the subspace topology, not the one on $\mathbb R$).
With this in mind, since the map is from $(0,1)$ to $[0,1]$, the fact that $f^{-1}([0,1]) = (0,1)$ is closed is true, and not a contradiction : this is because $f$, as defined as a topological map, is operating with the subspace topologies, not those directly derived from $\mathbb R$. That is the problem with your logic.
Best Answer
Option $A$ $\rightarrow $ $\mathcal constant \ \ function$
Option $C$ $\rightarrow$ $f(x)=1-x$
Option $D$ $\rightarrow$ $f(x)=|2x-1|$
The impossible one is option $B$. Here are two different explanations :
$1)$If possible , let us assume that $f((0,1])=(0,1).$ So, In $(0,1)$ we can find two sequences(Since this is not compact) that do not converge in $(0,1)$. Say $$w_n\rightarrow 0$$ and $$z_n\rightarrow 1$$. Since , $(0,1)$ is the image of $(0,1]$ under $f$ , we can write $$w_n=f(x_n)$$ and $$z_n=f(y_n).$$ For two sequences $x_n$ and $y_n$ in $(0,1].$ If both $x_n$ and $y_n$ have convergent subsequences in $(0,1]$ then by continuity of $f$ , $f(x_n)=w_n$ and $f(y_n)=z_n$ both have convergent subsequences and eventually converge in $f((0,1]=(0,1)$ , which is not the case. But in $(0,1]$ , the only chance of a sequence not having a convergent sub sequence is that , it converges to $0$ . This is how we ensure that :
By Bolzano-Weierstrass Theorem , we know that Every bounded sequence has a convergent sub sequence(In the completion of the sub space of $\mathbb R$ in consideration). So every sequence in $(0,1)$ has a convergent sub sequence in $\bar{(0,1]}=[0,1].$ The only limit point of $(0,1)$ that is not in $(0,1]$ is $0$ . Thus , both $x_n$ and $y_n$ must have $0$ as their limit in order not to converge in $(0,1].$
But then $$\lim_n x_n=0=\lim_n y_n\\i.e.\ \ \lim_n f(x_n)=f(0)=\lim_n f(y_n)\\ i.e.\ \ 0=f(0)=1$$ which is totally absurd . So, $$f((0,1])\neq (0,1)$$. Proved.
$2)$ We can write $$[0,1]=\{0\}\cup (0,1].$$ NOw for compactness , $$f([0,1])=C$$ for some connected,compact set $C$. Now , $$C=f([0,1])=f(\{0\})\cup f((0,1]).$$ Dependeng on whether $f$ is injective or not , $$f((0,1])=C\backslash \{y\}\\or,\ \ f((0,1])=C.$$ So, for $B)$ to be true , we need $$(0,1)=C\backslash \{y\} \ or\ C$$ but $(0,1)$ is not of that form . So , we have arrived at a contradiction again. So $B)$ is not true. Proved.