Show that the sequence $\{f_n\}$ of function where $f_n(x)=n/(x+n)$, is uniformly convergent in $[0,k]$ whatever $k$ may be, but not uniformly convergent in $[0,\infty)$.
The sequence is point wise convergent $\forall x\geq 0$, $$f(x)=1\hspace{1 cm} \forall x\geq0$$
How to proceed further?
The pointwise limit is $f(x)=1$.
In $[0,k]$ we have $$|f(x)-f_n(x)|=\left|1-\frac{n}{x+n}\right|=\frac{x}{x+n}$$
The map $$x\mapsto\frac{x}{x+n}$$ is an increasing function on $[0,k]$. So the maxima of this function (which occurs at $x=k$) is $\frac{k}{k+n}$.
So $$\lim_{n\to\infty}(\sup_{x\in[0,k]}|f(x)-f_n(x)|)= \lim_{n\to\infty}\frac{k}{k+n}=0$$ Hence $f_n\rightarrow f$ uniformly in $[0,k]$.