Here is the problem I am trying to solve:
Suppose $\{f_n\}$ is a sequence of continuous functions on $[0,1]$ so that $f_n(x) \to f(x)$ for any $x \in [0,1],$ where $f(x)$ is also continuous on $[0,1].$ Determine whether the following limit is true or not $$\int_{0}^{1}f_n(x)dx \to \int_{0}^{1}f(x)dx.$$
If the answer is true, prove it. Otherwise give a counterexample.
My trial is:
The answer is no, and here is the counter example
My question is:
Is my example correct? I am not sure if what I gave is a sequence of continuous functions or not.
Can someone help me answer this question please?

Your conclusion is correct, the limit does not hold. However, your counterexample fails because the functions in your sequence are discontinuous: there are points where they are not equal to their limits (this can be seen by the failure of the limit to exist at the points of discontinuity).
Making your functions continuous, though, we get our counterexample:
Let $(f_n)_{n=1}^\infty$ be a sequence of functions $f_n \colon [0,1] \to \mathbb{R}$ such that
$$f_n(x) = \begin{cases} s(n)\left(1 - s(n)\left\lvert \frac{2n+1}{s(n)} - x \right\rvert \right), &x\in \left[\frac{1}{n+1}, \frac{1}{n}\right]\\ 0, &x \not \in \left[\frac{1}{n+1}, \frac{1}{n}\right] \end{cases}$$
Where $s(n) = 2(n^2+n)$ is a scaling factor, which was chosen so that for all $n \in \mathbb{Z}^+$,
$$\int_0^1{f_n(x) \, \mathrm{d}x} = 1$$
This is a sequence of continuous functions, and we have
$$\lim_{n \to \infty}{\int_0^1{f_n(x) \, \mathrm{d}x}} = \lim_{n \to \infty}{1} = 1$$
But, we can see that the function $f = \lim_{n \to \infty}{f_n}$ is simply the zero function: $f(x) = 0$. For any $x \neq 0$, and any $\varepsilon$, we can choose $N = \left\lceil \frac{1}{x} \right\rceil$, such that for any $n>N$, we have $f_n(x) = 0$. For $x = 0$, $f_n(0) = 0$ for any $n \in \mathbb{Z}^+$.
Trivially, the integral of the zero function over any domain is zero. Thus,
$$1 = \lim_{n \to \infty}{\int_0^1{f_n(x) \, \mathrm{d}x}} \neq \int_0^1{f(x) \, \mathrm{d}x} = 0$$
And so the limit does not hold. This is because our sequence $(f_n)_{n=1}^\infty$, despite converging pointwise to $f$, fails to converge uniformly. In general, it is only true for uniformly convergent sequences of integrable functions that the limit function is integrable, and the integral of the limit function is equal to the limit of the integrals of the sequence of functions.