DEV Community

Techno-101
Techno-101

Posted on

Difference Between Compile Time and Run Time

Compile time and run time are two distinct phases in the execution of a computer program:

Compile Time: This is the phase where the source code of a program is converted into machine-readable code (e.g., binary code or bytecode) by a compiler. During compile time, syntax errors and some semantic errors are detected. The compiler translates the source code into an executable format, ready to be run.

Run Time: This is the phase when the compiled program is executed by the computer. During run time, variables are assigned values, functions are called, and data structures are manipulated. Errors that occur during run time, such as logic errors or exceptions, are detected while the program is executing.

In summary, compile time deals with the translation of source code into machine code, while run time involves the actual execution of the compiled program.
Check out the online compiler to excel in your web dev career!

Top comments (0)