The correct answer is option C, that is, waves.
Waves take place at shorelines and are inhibited by the rock walls, dunes, plants, sandbags, and raised structures. The deposition of sand mediated by waves produce beaches and sandbars. The waves continuously erode and shape the coastline.
The tides, winds, storms, and at certain occasions earthquakes results in the formation of waves. The sandbars also known as trough bars, are formed at the point of breaking of the waves.