Existence of sequence converges in L1 to $f$ but converges to $0$ pointwisely a.e. 
Problem:  Show that there a sequence of measurable function $(f_{n})$ such that $f_{n}\geq 0,$ and $f_{n} \to 0$ pointwise a.e., and $\forall f \in C[0,1]$, $$ \lim_{n \to \infty}\int_{0}^{1}f(x)f_{n}(x)dx = \int_{0}^{1}f(x)dx$$

Actually, what I found is that $\int_{0}^{1}f_{n} \to 1$ as $n \to \infty$. Also since $C[0,1]=C_{c}[0,1]$ is dense in $L^{1}$, the above limit holds for every $L_{1}$ function. However, I cannot proceed further. If you have some hint of this question, it will be greatly helpful for my thinking.
 A: The main idea is that $f_n$ should "imitate" the constant function $1$, by rapidly oscillating between $0$ and a large value, in such a way that on each interval $I_{n,k}$ in a partition $P_n$, the integral of $f_n$ over $I_{n,k}$ is its length. So for example you could partition $[0,1]$ into $n$ intervals of length $1/n$, set $f_n$ equal to $n$ on a subset of each interval of length $1/n^2$, and zero elsewhere. You need the large value so that $f_n$ can be nonzero only on a small set, which is how you obtain the a.e. convergence to zero.
Now a continuous $f$, on each of these intervals of length $1/n$, is close to being constant if $n$ is large. Thus $n$ times the integral of $f$ on the subinterval of length $1/n^2$ is close to the integral of $f$ on the whole interval of length $1/n$.
I should remark that my argument here only guarantees convergence in measure to zero. Ensuring a.e. convergence requires more or less "rapid convergence in measure", in a sense defined by the Borel-Cantelli lemma. My example actually does not do this, but you can tweak the specifics to force it to do so. Or you can just take a subsequence of this one.
By the way this density argument that you mention does not go through; there is a necessary interchange of limits that you cannot prove.
A: This can be done by trying to refine a counterexample to an easier problem:

Find a sequence $(g_n)$ in $L^1([0,1])$ such that $\int |g_n|=1$ for all $n$, but for any $x\in \mathbb R$ we have $\lim_{n\rightarrow\infty}g_n(x)=0$.

A classic solution to this is to set $g_n=2^n\cdot 1_{(0,2^{-n})}$ where $1_S$ is the indicator function of a set $S$ - i.e. the function that is $1$ on $S$ and $0$ elsewhere. The idea is that $g_n$ is supported on successively smaller sets, but concentrates its measure more and more on such sets. Observe that
$$\lim_{n\rightarrow\infty}\int_0^1f(x)g_n(x)=f(0)$$
since all the measure of $g_n$ accumulates towards $0$.

To get the answer actually desired, we can use the same idea of concentrating measure on a sufficiently small set, but somehow spreading this set evenly throughout the interval, to get the desired properties. In particular, define a set $S_n=\bigcup_{i=0}^{n-1}(\frac{i}n,\frac{i}n+n^{-3})$. That is, $S_n$ is the union of $n$ intervals of length $n^{-3}$ spaced evenly through the interval. 
Define $g_n=n^2\cdot 1_{S_n}$. Note that $\int_0^1 g_n = 1$, which is why we use a factor of $n^2$ here. Note that integrating $\int_0^1 f(x)g_n(x)$ is a lot like taking the sum $\frac{1}n\sum_{i=0}^nf(\frac{i}n)$ - and we can actually bound the difference between these terms using continuity. The bounds imply
$$\lim_{n\rightarrow\infty}\int_0^1 f(x)g_n(x) = \lim_{n\rightarrow\infty}\frac{1}n\sum_{i=0}^nf\left(\frac{i}n\right)=\int_0^1 f(x)$$
as desired.
It is not clear that $g_n$ converges to zero pointwise. However, using that the measure of $S_n$ is $n^{-2}$, the Borel-Cantelli lemma implies that $g_n$ converges to zero pointwise almost everywhere. Then, if you let $S$ be the set on which convergence to zero fails and define $$g'_n(x)=\begin{cases}g_n(x) & \text{if }x\not\in S\\
0 & \text{if }x\in S\end{cases}$$
You get a sequence which actually converges to zero everywhere and - since $g_n$ equals $g'_n$ almost everywhere, the integrals against $f$ do not change.
A: A quick hint :
Let $n$ a positive integer and $k<n$. If we define $g_{k,n}(k/n):= n$ if $x\in [\frac{k}{n},\frac{k}{n}+\frac{1}{n^2}[$  and $g_{k,n}(x):=0$ elsewhere, I think that the sequence 
$$f_n:=\sum_{k=1}^n g_{k,n}$$ 
will do the job.
It is rather clear that $f_n \rightarrow 0$ pointwise ae ; in the other hand $\int_0^1 f_n(x) f(x) dx$ will be "near" the Riemann sum $\frac{1}{n}\sum_{k=0}^n f(k/n)$.   
