Molarity's formula is known as: Molarity(M)=moles of solute/liters solution.
In this case we are already given moles and liters so you just have to plug the numbers into the equation.
0.400 mol HCL/9.79L solution=0.040858M
If you were to use scientific notation, the answer will be: 4.1*10^-2, but otherwise, you can just use the decimals above and round appropriately as you see fit.