Step 1: Understanding the total energy in S.H.M.
The total energy \( E \) in simple harmonic motion is given by the formula:
\[
E = \frac{1}{2} m \omega^2 A^2
\]
where \( \omega \) is the angular frequency and \( A \) is the amplitude. The angular frequency \( \omega \) is related to the period \( T \) by:
\[
\omega = \frac{2\pi}{T}
\]
Step 2: Substituting \( \omega \) into the energy formula.
Substitute \( \omega = \frac{2\pi}{T} \) into the energy formula:
\[
E = \frac{1}{2} m \left( \frac{2\pi}{T} \right)^2 A^2 = \frac{2\pi^2 m A^2}{T^2}
\]
Step 3: Conclusion.
Thus, the correct answer is (C), \( \frac{2\pi^2 mA^2}{T^2} \).