Answer :
Coral is made of a compound called Calcium Carbonate. When ancient coral died and was covered by sediment, it becomes limestone, basically. I'm sure the process is much more complex than this.
Answer:
Due to weathering of seawater.
Explanation:
Coral polyps are tiny marine animals that secrete calcium carbonate from its epidermis. These calcium carbonate deposits on the base of the coral polyp forming the basal plate. When the coral polyp dies, its skeleton deposits and forms the coral reefs. These are nothing but the coral limestones. These reefs gradually form the coral island mainly near the seashores. Because the reef formation happens in the shallow water region and needs temperature. Sometimes the weathering also deposits the coral reef near the seashore. This is the very reason the coral limestone also found on lands.