Runtime vs Compile time Flashcards
Learn the difference between runtime and compile time (8 cards)
What is compile time?
Compile time is the phase in which the source code of a program is translated into machine code or bytecode by a compiler.
What does the compiler do during complation?
During compilation the compiler checks for syntax errors, type correctness, and some semantic issues in the code.
What happens if there is a compile time error?
If there is a compile time error it will prevent the program from being executed until it is fixed.
What is runtime?
Runtime occurs when compiled code is executed by a processor.
What happens during runtime?
During runtime the program interacts with system resources (such as memory and files) and performs computations based on the instructions given in the code.
What happens if you get a runtime error?
The program can crash, display an error message or behave unexpectedly.
When does compile time occur?
Compile time occurs before the program is run, allowing for early detection of syntax and type errors.
When does runtime occur?
Runtime occurs during program execution.