Because the amount of vitamin C is given in grams, we need to determine the mass of the solution in grams as well.
The correct formula of Molarity can only be determined when you know the proper definition of the term and the meaning of all the other chemical terms used to build the formula.
So for those calculations, we need to pay attention while working with the density formula mentioned above.