Actually, I know how to prove it.
In the vector space $C^\infty$, differentiating operator $D:C^\infty\to C^\infty$ is linear mapping with $1$ dimensional kernel. Because we can write $f''(t)+c^2f(t)=(D^2+c^2I)f$, one can prove that the solution space of $f''(t)+c^2f(t)=0$ is $2$ dimensional and $\{\sin t, \cos t\}$ forms a basis.
However, friend of mine told me there is another way : all he said is to differentiate following two functions.$$g(t)=f(t)\cos(ct)-c^{-1}f'(t)\sin(ct)$$ $$h(t)=f(t)\sin(ct)+c^{-1}f'(t)\cos(ct)$$
It was interesting to see that $g'(t)=h'(t)=0$, but I can't go any further.
Any advice and suggestions will be greatly appreciated.
$g$ and $h$ are constant. Let $g(t)=a, h(t)=b$ for all $t$ and consider the sum $g(t)\cos(ct) +h(t)\sin(ct)$.