The molarity \( M \) of a solution is calculated using the formula:
\[
M = \frac{\text{moles of solute}}{\text{volume of solution in liters}}
\]
First, calculate the moles of sodium chloride (\( \text{NaCl} \)):
\[
\text{moles of NaCl} = \frac{\text{mass of NaCl}}{\text{molar mass of NaCl}} = \frac{5.0 \, \text{g}}{58.5 \, \text{g/mol}} \approx 0.0855 \, \text{mol}
\]
Next, convert the volume of the solution from milliliters to liters:
\[
\text{volume of solution} = 250 \, \text{mL} = 0.250 \, \text{L}
\]
Now, calculate the molarity:
\[
M = \frac{0.0855 \, \text{mol}}{0.250 \, \text{L}} = 0.342 \, \text{M}
\]
Rounding to two decimal places, the molarity is \( 0.34 \, \text{M} \).
Thus, the molarity of the solution is \( 0.34 \, \text{M} \).