Hydrochloric acid is a strong acid. This means that in a solution all the H+ ions will be released. Also, one mole of HCl has one hydrogen atom, so we can assume that the concentration of HCl is equal to the concentration of H+ ions.
On the other hand, the definition of pH tells us:
Where [H+] is the ions H+ concentration.
H+ concentration is 10^-4M. If we replace in the equation we will have:
answer: The pH of the solution is 4