Multiple choice

What is a compiler?

  1. It translates one statement of high level language program to machine language and immediately execute it.

  2. A translate which translates entire high level language to machine language and then executes it.

  3. It executes the program only.

  4. None of the above

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

A compiler translates the entire high-level language program to machine language before execution, creating an executable file. This distinguishes it from interpreters (which translate and execute one statement at a time, described in option A) and pure executors. Option B correctly describes the compiler's two-step process.