Earthquake is a sudden shaking of the ground caused by the sudden movement of rock…