In mango, the mesocarp is fleshy and edible. Endocarp is stony and inedible.
In coconut, the endocarp is stony, which is inedible. The edible part is the endosperm.
In mango and coconut, the fruit is known as a drupe and it develops from monocarpellary superior ovaries and are one seeded. In coconut the mesocarp is fibrous.