smooth functions are dense in the space of bounded continuous functions - why? Let $C_b $ be the space of real valued bounded continuous functions that are defined on $\mathbb {R} $. Let  $S $ be the subset of smooth functions in  $C_b $. My probability theory book states the following without proof:
$S $ is dense in $C_b$
Why is this true? 
The book does not mention it but I guess that  $C_b $ is equipped with the norm  $||\,\,||_{\infty}$
Thank you a lot.
 A: Sketch: If $a<b<c<d,$ and $y_1,y_2 \in \mathbb R.$ Then there is a $C^\infty$ function that equals $y_1$ on $[a,b],$ equals $y_2$ on $[c,d]$, and that is monotone on $[b,c].$
Suppose $f\in C[0,1].$ By uniform continuity there is a step function $s$ that is uniformly close to $f$ on $[0,1].$ We can assume that the step function equals $f(0)$ on the first interval and equals $f(1)$ on the last interval. Using $C^\infty$ functions of the kind discussed above, there exists a $C^\infty$ function $g$ such that $g$ is uniformly close to $s,$ and hence $f,$ on $[0,1]$ with $g=f(0)$ on $[0,a]$ and $g = f(1)$ on $[1-a,1]$ for some small $a>0.$
There's nothing special about $[0,1]$ here. If $f$ is any continuous function on $\mathbb R,$ we can do this on $[n,n+1]$ for each $n\in \mathbb Z.$ We obtain $C^\infty $ functions $g_n$ on each such interval, and because these functions are absolutely flat near the end points, they paste together to give a function in $C^\infty(\mathbb R)$ that is uniformly close to $f$ on $\mathbb R.$
