I am not too sure how to do this question. I know that $Y$ is dense in $X$ if the closure of $Y$ (intersection of all closed sets in X that contain Y). However, I cannot seem to make the intuitive leaps required to answer this question. There is a similar question that uses the Hahn-Banach theorem, but this is not part of my course. So I would prefer another way of doing it!
Assume $Y$ is a linear subspace of X, such that Y is dense in X, and $\phi \in X^*$ such that $\phi(y)=0$ for every $y\in Y$. Prove $\phi(x)=0$ for every $x \in X$.
Here's another proof: Fix $x\in X$. Since $Y$ is dense, we can find a sequence $\{y_n\}$ in $Y$ convergent to $x$. Given $\varepsilon>0$, there is some $n\in N$ such that $\|x-y_n\|<\varepsilon$. Then we have $$|\phi(x)|=|\phi(x-y_n)|\leq\|\phi\|\|x-y_n\|<\|\phi\|\varepsilon.$$ Since $\varepsilon>0$ was arbitrary, we have $\phi(x)=0$, and since $x\in X$ was arbitrary we have $\phi=0$.