I want to know if $C^{\infty}[0,1]$ or $S$ (Schwartz function space) is separable. Can somebody offer me some results or references? Thank you!

We need the following extension of Weierstrass approximation theorem:
To see that, we first notice that for each integer $d$, we can find a sequence $(P_{d,n})$ such that $\displaystyle\lim_{n\to \infty}\max_{0\leqslant k\leqslant d}\sup_{x\in [0,1]}f^{(k)}(x)P_{d,n}(x)=0$ (approximate $f^{(d)}$ by the classical theorem, then integrate adequately). For each $d$ and $j$, consider $n(d,j)$ such that $\max_{0\leqslant k\leqslant d}\sup_{x\in [0,1]}f^{(k)}(x)P_{d,n(d,j)}(x)<\frac 1{j+d}$, then take $P_j:=P_{j,n(j,j)}$. So polynomials with rational coefficients are dense in $C^{\infty}[0,1]$. For the Schwartz space, we can use jbc idea's: let $C_0(\mathbb R)$ be the space of functions form $\mathbb R$ to $\mathbb R$ which vanish at infinity (endowed with the supremum norm), and $X:=C_0(\mathbb R)^{\mathbb N\times\mathbb N}$. We can embed $\mathcal S(\Bbb R)$ in a closed subspace of $X$ (for the product metric) by $\iota\colon\mathcal S(\mathbb R)\to X$, $\iota(f):=(x^kf^{(d)}(x))_{(k,d)\in\mathbb N\times\mathbb N}$. As $X$ is separable, so is $\mathcal S(\mathbb R)$. Also, deeper reasons have been mentioned in the comments. 


In addition to other good answers and comments, a small variation may be of interest. If we replace $C^\infty[0,1]$ by $C^\infty(\mathbb T)$ with circle $\mathbb T$, then the standard LeviSobolev theory shows that $C^\infty(\mathbb T)=H^\infty(\mathbb T)$, and for every real $s$ the $s$th LeviSobolev space $H^s(\mathbb T)$ has an orthogonal basis of the usual exponentials. Of course, their lengths change with $s$. Thus, rational linear combinations of exponentials give a countable dense subset. An only slightlylessknown version for the Schwartz space is to observe that it is a sort of $H^\infty$ space for the ("Schrodinger"?) differential operator $S=\Delta+x^2$ in place of just $\Delta$ for the "usual" LeviSobolev spaces: $f^2_s=\langle S^kf,f\rangle$. Similar to the usual RellichKondrachev compactness, the inclusion $H^1\rightarrow L^2(\mathbb R)$ is readily shown to be compact, so $S$ has compact resolvent, and discretely decomposes $L^2(\mathbb R)$. The orthogonal basis of eigenfunctions for every $H^s$ is Hermite polynomials times suitable Gaussians. (The latter fact admits various proofs, both via Weierstrass approximation, and via the raising (creation) and lowering (annihilation) operators.) Thus, rational multiples of Hermite polynomial multiples of suitable Gaussians are a rational dense subset. 

