Beginner Compilers & Programming Language Theory
Q7 / 100

What is the difference between a compiler and an interpreter?

Correct! Well done.

Incorrect.

The correct answer is B) A compiler translates the entire program to machine code before execution; an interpreter executes source code directly, typically line-by-line

B

Correct Answer

A compiler translates the entire program to machine code before execution; an interpreter executes source code directly, typically line-by-line

Explanation

Compiler (C, Rust): translate to native code, no runtime translator needed. Interpreter (Python, Ruby): translate+execute per statement. JIT (Java, JS V8): compile hot paths at runtime for speed with interpreter flexibility.

Progress
7/100