Step 1: Convert speed to m/s.
\[
\text{Speed} = 45 \, \text{km/h} = 45 \times \frac{1000}{3600} \, \text{m/s} = \frac{45 \times 1000}{3600} = 12.5 \, \text{m/s}.
\]
Step 2: Total distance covered by the train in 30 seconds.
\[
\text{Distance covered} = \text{Speed} \times \text{Time} = 12.5 \, \text{m/s} \times 30 \, \text{sec} = 375 \, \text{m}.
\]
Step 3: Length of the train.
The total distance covered is the sum of the length of the train and the length of the bridge (100 meters):
\[
\text{Length of the train} = \text{Total distance covered} - \text{Length of the bridge} = 375 \, \text{m} - 100 \, \text{m} = 275 \, \text{m}.
\]