Won't the ball's velocity at one point be 0 when it comes in contact with the ceiling? (The same way as its velocity momentarily is 0 when it is thrown downwards and comes in contact with the ground before bouncing back upwards).
Yes. Its velocity will momentarily be zero.
That should give zero acceleration at that point[...]
No! Velocity being zero says nothing about the acceleration. Just like your position being zero (i.e. when returning home after a day at work) says nothing about your velocity (you could be running in high speed when arriving at your starting position, or you could reach it slowly, or you could stand still at the starting spot. Different velocities are possible where the position is zero; position and velocity are unrelated, and so are velocity and acceleration).
When throwing a ball up, the ball will also momentarily reach zero speed before falling back down to your hand. But gravity is there all the time causing a non-zero acceleration all the time - also when the speed is zero. So, acceleration can't be understood from the value of velocity, only from the change in the value of velocity.
And why the peak then in answer D? Because,
- while flying upwards, gravity causes a constant downwards acceleration. The ball slows down at a constant rate.
- When hitting the ceiling, the ceiling suddenly slows down the ball instantly. That requires a much larger downwards acceleration in that instant in order to reduce the speed to zero in very short time. Thus the peak on the graph.