Identify when $f(x) = 0$. I have the following problem to solve.

My attempt
a. $\int_0^{\pi} x^n f(x) dx =0$ $\forall$ $n \ge 0$ gives $ x^n f(x) dx =0$ almost everywhere in $[0,\pi]$ $\forall$ $n \ge 0$. Putting $n = 0$ we shall get $f(x) = 0$ almost everywhere. As $f(x) \in C[0,\pi]$ we shall say $f(x) = 0$ $\forall$ $x \in [0,\pi]$
b. It is same as a. We shall put $n = 0$ and $\cos(nx) = 1$ $\Rightarrow$ $f(x) = 0$ $\forall$ $x \in [0,\pi]$
c. $\int_0^{\pi} f(x) \sin(nx) dx =0$ $\forall$ $n \ge 1$. Now  $f(x)\sin(nx) = 0$ almost everywhere. But I am not getting any more here.
Integrals of b and c are looking like Fourier coefficients of the function $f(x)$. Can we say anything from it? 
Thank you for your help. 
 A: a) is true. Hint : use Stone Wierstrass approximation theorem.
b) is false. Hint : consider $f(x) = 1$
A: Your line of reasoning for case a) will only work if we can assume $f \geq 0$. Note that for $f = \cos 2x$, we have
$$
\int_0^\pi x^0 \cos 2x = 0
$$
The same is true for your approach to b).
The trick is that you'll need a function generated by polynomial whose sign is identical to that of $f$ at all $x$. One good candidate is the infinite polynomial approximation of $f$.
A: Continuous functions can be approximated uniformly both by polynomials and trigonometric polynomials. The condition implies that $$\int_0^{\pi} pf=0$$ for any polynomial. Now choose $p$ such that $\lVert p-f\rVert_\infty<\varepsilon$, and let $M$ an upper bound for $f$ over $[0,\pi]$ and note that $$\int_0^\pi f^2=\int_0^\pi f(f-p)<M\pi\varepsilon $$
For $(b),(c)$ you should be able to find counterexamples if only one of the two conditions hold, but if both hold the above works analogously with $p$ a trigonometric polynomial.
