The purpose of a surge tank is

to control the pressure variations due to rapid changes in the pipe line flow
to eliminate water hammer possibilities
to regulate flow of water to turbines by providing necessary retarding head of water
all of the above
✅ The correct answer is option D.

The function of a piston in a steam engine is

to guide motion of the piston rod and to prevent it from bending
to transfer motion from the piston to the cross-head
to convert heat energy of the steam into mechanical work id) to exhaust steam from the cylinder at proper moment
✅ The correct answer is option C.