A body is said to be in uniform motion if the body covers equal distance in equal intrevals of time.Then why is it said that when a body is in rest,it is in uniform motion?

"Rest" is a special case of uniform motion. The "equal distance" travelled in equal time intervals just happens to be zero.