Proving $C_0^1(\Omega)$ is not dense in $H^1(\Omega)$. Hi I am trying to work on the following problem:

(a) $C_0^1(\Omega)$ is dense in $L_2(\Omega)$ 

(b) $C_0^1(\Omega)$ is dense in $H_0^1(\Omega)$. 

(c) Explain why $C_0^1(\Omega)$ is not dense in $H^1(\Omega)$.

I know how to do (a) and (b) but I couldn't find how to solve (c). Any help would greatly appreciated. Thanks in advance.

So By following the comments given below I got

$$f_n(x)=\begin{cases}n^2x^2,\,\,\,\,\,\,\,0\le x\le\frac{1}{n}\\1,\,\,\,\,\,\,\,\frac{1}{n}\le x\le 1-\frac{1}{n}\\n^2x^2,\,\,\,\,\,\,\,1-\frac{1}{n}\le x\le 1\end{cases}$$

Clearly $f_n(x)\to 1$ but $f(x)=1\not\in C_0^1(\Omega)$ where as $f_n(x)\in C_0^1$, therefore $C_0^1(\Omega)$ is not dense in $H^1(\Omega)$.

I still have a doubt about the fact that is $f_n(x)$ in $C_0^1(\Omega)$, since the derivative is not continuous anymore.
You can check that via looking at the trace. Let $D$ denote the closure of $C_0^1(0,1)$ in $H^1(0,1)$. By definition, the trace of $u \in C_0^1(0,1)$ is zero at both end points. Moreover, it is continuous. Hence, the trace of any function in $D$ is $0$. However, there are functions in $H^1(0,1)$ with non-zero trace, e.g., $x \mapsto 1$.
Note: f(x) = 1 has compact support, so this entire example is invalid.