The pH of a strong acid like HCl is calculated using the formula:
\[
\text{pH} = -\log[\text{H}^+]
\]
For HCl, the concentration of \( \text{H}^+ \) ions is the same as the concentration of HCl, which is \( 0.01 \, \text{M} \).
Substituting the value:
\[
\text{pH} = -\log(0.01) = -(-2) = 2
\]
Thus, the pH of the solution is 2.