Let $(f_n)$ be sequence of continuous functions on the domain $[a,b]$ which converges uniformly to $f$. The function $f$ is continous and so must be integrable. The limit of the integrals ($\displaystyle\int f_n$) is equal to the integral of the limit function $\displaystyle\int f$. So $\displaystyle\lim_{n\to\infty}\int f_n=\int f$.
Show that the result above may not be extended to improper integrals by attempting to apply it to sequence of functions defined by
$f_n(x) = \begin{cases} (n-|x|)/n^2 & \text{when $x\in[-n,n]$}\\ 0 & \text{otherwise.} \end{cases}$
What I didn't understand is that what is question asking. What does it means by "not be extended to improper integrals"? I have evaluated the improper integral of first kind where input of function is bounded by $[-n,n]$ which is $2n^2-\dfrac{|n|}{n}$. And as $n$ approaches $\infty$ or negative $\infty$ the integral approaches to $\infty$ this means limit exist but it is divergent. So this still doesn't satisfy me.
Improper integrals in this context are integrals with infinite bounds.
What you are being asked is to show that for the given function, $f_n \to 0 $ uniformly on the Real line but that $$ \int_{-\infty}^{+\infty} f_n \not \to 0.$$ The first task is to show uniform convergence. This is evident because for each $ n $ we have $ | f_n(x)| < 1/n $ for all $x$.
The second task is to evaluate, $$\int_{-\infty}^{+\infty} f_n(x) ~ dx = 2 \int_0^\infty f_n(x) dx \\ = 2\Bigg[ \frac{nx - \tfrac{1}{2}x^2}{n^2}\Bigg]_0^n \\ = 1. $$
Thus $\int f_n $ trivially converges to $ 1 $ but $ \int (\lim f_n ) = \int 0 = 0 $ and these two are not equal.
Thus the principle fails for an unbounded domain.