Something i use to convert metric units is: King Henry Died By Drinking Chocolate Milk. This is an acronym for: K: Kilos H: Hecto D: Deka B: Base (liters or grams etc.) D: Deci C: Centi M: Milli
Now, since you are going from hectograms (hecto) to grams (base) you will move the decimal to the right 2 times (since base is 2 bellow hecto) So that means: There are 4,000 grams in 40 hectograms.