Hydrochloric acid (HCl) is a strong acid, meaning it dissociates completely in water. The concentration of \( \text{H}^+ \) ions is the same as the concentration of the acid, which is 0.01 M.
The pH is calculated using the formula:
\[
\text{pH} = -\log [\text{H}^+]
\]
Substitute \( [\text{H}^+] = 0.01 \) M:
\[
\text{pH} = -\log (0.01) = 2
\]
Thus, the pH of the solution is 2, corresponding to option (2).