Show that for a Lebesgue measurable function $f\colon R^n\rightarrow R$, there is a sequence of continuous function $\{f_i\}$ that $f=\lim_{i\rightarrow\infty}f_i$ almost everywhere.
What about also prove the other side? i.e. if $f=\lim_{i\rightarrow\infty}f_i$ almost everywhere then $f$ is Lebesgue measurable.
A similar question can be found here. But it doesn't show how actually is this question proved. Is every Lebesgue measurable function on $\mathbb{R}$ the pointwise limit of continuous functions?
In fact the similar question you posted answers your question.
The only thing you need is that Luzin's Theorem is true for the whole space,not only for sets if finite measure.
Lets prove this.
Now $\forall n \in \Bbb{N}$ exists $G_n$ continuous on $\Bbb{R}^n$ such that $m(\{G_n \neq f\})< \frac{1}{2^n}$
By Borel-Cantelli we have that $m(\bigcap_{n=1}^{\infty}\bigcup_{k=n}^{\infty}\{G_k \neq f\})=0$
Thus for almost every $x$ we have that exists $m \in \Bbb{N}$ such that $G_n(x)=f(x),\forall n \geq m$
So you have the conclusion.
For the other part,note that every continuous function is measurable.
Thus $\limsup_nf_n$ is measurable so $f=\limsup_n f_n$ is measurable.