The pH of a strong acid like \( \text{HCl} \) is calculated using the formula:
\[
\text{pH} = -\log [\text{H}^+]
\]
Since \( \text{HCl} \) dissociates completely in water, the concentration of hydrogen ions \( [\text{H}^+] \) is equal to the concentration of the acid, which is \( 0.01 \, \text{M} \).
Substitute the value into the equation:
\[
\text{pH} = -\log (0.01) = -(-2) = 2.0
\]
Thus, the pH of the solution is \( 2.0 \).