Solution (source code)

= Solution

By the <Riesz-Markov-Kakutani representation theorem>, the <continuous dual space> of $C(K)$ is isometrically the space of finite <regular Borel measures>, signed for real scalars and complex for complex scalars:
$$
\boxed{C(K)^*\cong M(K),\qquad L_\mu(f)=\int_Kf\,d\mu,\qquad \|L_\mu\|=|\mu|(K).}
$$
Here $|\mu|$ is the <variation measure>, whose total mass is the <total variation norm of a measure>.

If $f_n\rightharpoonup0$ in $C(K)$, evaluation at each $t\in K$ gives $f_n(t)\to0$. The <Uniform boundedness principle> also gives $M=\sup_n\|f_n\|_\infty<\infty$. For any $\mu\in M(K)$, the <dominated convergence theorem> with respect to the finite positive measure $|\mu|$ yields
$$
\left|\int_Kf_n^2\,d\mu\right|\leq\int_K|f_n|^2\,d|\mu|\longrightarrow0,
$$
since $|f_n(t)|^2\to0$ pointwise and $|f_n(t)|^2\leq M^2$. Thus
$$
\boxed{f_n^2\rightharpoonup0\text{ in }C(K).}
$$
The same proof works for complex squares, because the absolute-value domination remains valid.