ICSE Class 10 Answered
It is the force exerted within the glass when it hits the floor that breaks it.
If the glass falls on a hard floor like concrete then the force is very big because the floor has no "give" i.e. it can't further compress or provide some additional distance to slow down. Effectively the bit of the glass that hits the floor stops instantly but the rest of the glass following behind is still moving. The force within the glass is bigger than the tensile strength of the material and so it fails.
If the glass falls on a carpet then the carpet has some "give." The glass slows down over a few millimeters by squashing the carpet. This massively reduces the forces within the glass and gives it a fighting chance of staying in one piece.