|You avoid run time errors by writing correct code. Bit its very nature, the compiler cannot detect tun-time errors. as it is impossible for the compiler to anticipate all possible errors that might occur when a programme is run. |
It is your skill as a programmer that eliminates run time errors.