Runtime vs. Compile time

前端 未结 27 1575
后悔当初
后悔当初 2020-11-22 06:50

What is the difference between run-time and compile-time?

27条回答
  •  鱼传尺愫
    2020-11-22 07:30

    The major difference between run-time and compile time is:

    1. If there are any syntax errors and type checks in your code,then it throws compile time error, where-as run-time:it checks after executing the code. For example:

    int a = 1 int b = a/0;

    here first line doesn't have a semi-colon at the end---> compile time error after executing the program while performing operation b, result is infinite---> run-time error.

    1. Compile time doesn't look for output of functionality provided by your code, whereas run-time does.

提交回复
热议问题