These gaps which are of the order of a few millimeters, are provided to allow room for the rails to expand the rise in temperature due to the atmospheric temperature as well as the friction caused by running of train. All materials expand when heated and contract when cooled. The extent of expansion and contraction is quite low to be noticed by people or make much difference in most situations. However, since each section of the rail is very long, the expansion due to heating is significant, and unless space is provided for expansion of rails, the rails will bend to accommodate the increased length. This will make the railway unfit for running of trains.
Answer: the tracks will buckle under the force.
Explanation: Heat-related expansion places a lot of stress on the ties, ballasts, and rail anchors that keep the tracks fixed to the ground.