Is $C^{\infty}_c(R^n) $ dense in $C_0(R^n)$? If $C^{\infty}_c(R^n) $ is dense in $L^p(R^n)$ then is it dense in $C_0(R^n)$?
 A: To answer the question if $C_c^\infty(\mathbb R^n)$ is dense in $C_0(\mathbb R^n)$. Yes, it is. Either one uses cut-off functions as in the other answer or one can just use the Stone-Weierstrass Theorem (actually the version for $C_0$-spaces): 
So notice that $C_c^\infty(\mathbb R^n)$ is clearly a subalgebra of $C_0(\mathbb R^n)$. Moreover, it can be seen easily by considering bump-functions that $C_c^\infty(\mathbb R^n)$ seperates the points, i.e., for all $x, y \in \mathbb R^n$, $x \neq y$ there is $f \in C_c^\infty(\mathbb R^n)$ such that $f(x) \neq f(y)$. Finally, by considering bump-functions one see that $C_c^\infty(\mathbb R^n)$ vanishes nowhere, which means that for each $x \in \mathbb R^n$ there is $f \in C_c^\infty(\mathbb R^n)$ such that $f(x) \neq 0$. 
Hence, the Stone-Weierstrass Theorem yields the density of $C_c^\infty(\mathbb R^n)$. I hope that answers your question. 
A: I think this is true. First, note that you can use convolution to find smooth functions arbitrarily similar to a given continuous function. You can do this by covering the space will balls, smoothing on each ball, and stitching them back together with a partition of unity. For this reason, it should be enough to prove that smooth compactly supported functions are dense in smooth and vanishing at infinity functions. This is just an easy cut-off argument though.
Let $f \in C_0(\mathbb{R}^n)$. We need to show that for any $\epsilon > 0$, there is a function $g$ with compact support so that $||f-g||_\infty < \epsilon$, since the topology on $C_0$ is the uniform topology induced by the uniform norm.
But now let $\epsilon$ be given. Then there is some compact set $K_\epsilon$ outside of which we have $|f|<\epsilon$. Let $B_n$ be the smallest ball of integer radius (just for simplicity) containing $K$, and let $\phi_n$ be a smooth cut-off function which is $1$ on $B_n$ and $0$ for $|x| > n+1$. Then we can define $g = |f|\phi_n$. On $K_\epsilon$, $f$ and $g$ are identical. And outside $K_\epsilon$, they differ by at most $\epsilon$. Yet $g$ has compact support.
