Where, M is molarity (M or mol/L), n is number of moles (mol) and v is the volume of the solution (L).
The molarity of given glucose solution is 2.5 M.
Volume is 1.0 L
Hence
2.5 M = n/1.0 L
n = 2.5 mol
Hence, number of moles of glucose in 1.0 L of 2.5 M solution is 2.5 mol.