I tried this but of no use
if(getY(ball)+getHeight(ball)>=getHeight(window))
{
lives=LIVES-1;
removeGWindow(window,ball);
GOval ball=initBall(window);
stop= 1;
//setLocation(ball, 190, 300);
}
if(stop==1 && event!= NULL && getEventType(event)==MOUSE_CLICKED)
{
move(ball, 0, velocity);
velocity=drand48();
speed=drand48();
move(ball,velocity,speed);
stop=0;