Sequence of measurable functions $\{g_n\}_{n=1}^{\infty}$ such that $\lim_{n\to\infty}\int_{0}^{1}f(t)g_n(t)dt=\int_0^1f(t)dt$ whenever $f\in C[0,1]$ I've been working on some old real analysis qualifier problems. One I'm having trouble with is

Prove that there exists a sequence of measurable functions $g_n$ on $[0,1]$ such that
  
  
*
  
*$g_n(x)\geq 0$ for any $x\in [0,1]$;
  
*$\lim_{n\to\infty}g_n(x)=0$ a.e.;
  
*For any continuous function $f\in C[0,1]$,
  
  
  $$
\lim_{n\to\infty}\int_{0}^{1}f(x)g_n(x)dx=\int_{0}^{1}f(x)dx.
$$

I don't quite know how to approach this problem. My first thought was to see if I can come up with something assuming $f$ is a simple function -- but I couldn't think of anything. My next attempt is to just assume that $f$ is the characteristic function of interval, but even this proves to be a challenge; I'm thinking of something having to do with delta functions. Whatever the sequence is, it must have $\int_0^1\sup_n|g_n(x)|dx=\infty$; else Lebesgue's dominated convergence theorem would show that (3) would always be zero.
Here's another thought I had in mind. The map defined by $T(f)=\int_0^1f(x)dx$ is an element of $C[0,1]^*$. Are there any results that say something to the effect of "functionals of the form $f\mapsto \int_0^1fg dx$ are dense in $C[0,1]^*$"? "Or integration against a measure which absolutely continuous to Lebesgue measure is dense in $C[0,1]^*$"? Thanks in advance.
 A: Very roughly, the idea is to approximate the uniform measure as a normalized sum of  ``delta" measures. Here is one construction that is very easy to understand (I hope).
For each $n$, let $A_n =\cup_{k=0}^{2^{n}-1} [\frac{k}{2^n},\frac{k}{2^n} + \frac{1}{2^{2n}}]$. 
Set $g_n = 2^n {\bf 1}_{A_n}$.  Then $g_n \ge 0$, $\int g_n =2^n \times 2^{n} 2^{-2n}=1$, and $g_n \to 0$ a.e. To see the last claim observe that $A_{n+1} \subset A_n$ and $m(A_n)=2^n 2^{-2n} = 2^{-n}$ (or, if lazy to verify, use Borel Cantelli to show that the set of points which belong to infinitely many $A_n$'s is a null set, or use the fact that indicators of $A_n$ converge in measure to $0$ to extract a subsequence converging to zero a.e.). 
Now if $f$ is continuous $\int f g_ndx  = \sum_{k=0}^{2^n-1} 2^n \int_{[k2^{-n},k2^{-n}+2^{-2n}]} f dx$. 
By uniform continuity of $f$, we know that for any $\epsilon>0$ there exists $n$ such that $|f(x)-f(y)|<\epsilon$ provided $|x-y|\le 2^{-2n}$. Therefore 
\begin{align*} &\left| \sum_{k=0}^{2^n-1} 2^n \int_{[k2^{-n},k2^{-n}+2^{-2n}]} f dx -\underset{(*)}{\underbrace{ \sum_{k=0}^{2^n-1} 2^n f(k2^{-n})2^{-2n}}}\right| 
\\
&= \left| \sum_{k=0}^{2^n-1} 2^n \int_{[k2^{-n},k2^{-n}+2^{-2n}]} f(x) - f(k2^{-n}) dx \right|\\
& \le  \sum_{k=0}^{2^n-1} 2^n \int_{[k2^{-n},k2^{-n}+2^{-2n}]} \left| f(x) - f(k2^{-n}) \right|dx\\
& \le   \sum_{k=0}^{2^n-1} 2^n 2^{-2n} \epsilon = \epsilon.
\end{align*}
But $(*)$ is a Riemann sum for $f$. That is: 
$$(*) = 2^{-n} \sum_{k=0}^{2^n-1} f(k 2^{-n})\to \int_0^1 f(x) dx.$$
The result follows because $\epsilon$ is arbitrary. 
