Provide examples or explain why it is impossible

For a) I would just consider a constant function, $[a,a]$ is a closed interval. If you want an interval of positive length, $\sin$ or some variation (like yours) is the way to go. Personally I would prefer to adapt the domain to adding stuff and factors.

For b) your argument is correct for bounded intervals.

For c) you could do something with $x+\frac{1}{x}$.

For d) consider what the intermediate value theorem would mean for such a function.


For b) think about $(\sin x)(1-1/x)$ on $[1,\infty).$