The correct option is B Sedimentary rocks
When rivers flow, they carry pieces of weathered rocks, soil, etc. with the water. They settle down at bottom and form sediments at seabeds, riverbeds, etc. As time progresses, more minerals accumulate in the top of these sediments. These upper layers exert pressure on lower layers which get squeezed and forms sedimentary rocks.