Multiple choice

What does a compiler do?

  1. Converts a program into machine code before it is run

  2. Converts a program into machine code when it is run

  3. Helps a programmer debug their code

  4. All of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A compiler translates the entire source code into machine code (an executable file) before the program is run, unlike an interpreter which translates code line-by-line during execution.