Given a sequence of continuous functions $f_n: [a,b] \rightarrow \mathbb{R}$, $f_n \rightarrow f$ pointwise and $f$ continuous, does $f_n \rightarrow f$ uniformly?
I know that this is not true if $f$ is not continuous, for example let $[a,b] = [0,1]$ and $f_n = x^n$, then $f_n \rightarrow f$, $f(x) = 0$ for $x \in [0,1)$ and $f(1) = 1$.
However, given $f_n \rightarrow f$ and $f$ is continuous, this seems to be true. It seems really strong though so I am wondering if there are counterexamples.
A standard counterexample is $f_n(x)=nxe^{-nx}$ in $[0,1]$. It converges pointwise to the zero function. However, the convergence is not uniform, because for every $n\in\mathbb{N}$:
$\sup_{x\in [0,1]}|f_n(x)-0|\geq |f_n(\frac{1}{n})|=\frac{1}{e}$
I'll add that a sufficient condition for uniform convergence is Dini's theorem. If we remove any of its requirements (like here we removed the monotonicity of the sequence at every point) then there are counterexamples.