Mango and coconut are a type of fruit called
Drupe
Drupe is a type of fruit wherein, the pericarp or fruit wall is differentiated into thin epicarp(skin), fleshy mesocarp and stony endocarp. Hence, it is also called as stone fruit, e.g., mango, coconut, peach, almond, trapa etc. In mango, mesocarp is juicy and edible. In coconut, mesocarp is fibrous and endocarp is hard and stony.