Differences between Compiler, Assembler, and Interpreter MCQs January 8, 2026December 13, 2024 by u930973931_answers 10 min Score: 0 Attempted: 0/10 Subscribe 1. Which of the following is true about a compiler? (A) Translates code line by line (B) Executes the program directly (C) Translates the entire program into machine code at once (D) Translates and executes code simultaneously 2. What is the main function of an assembler? (A) To convert assembly language code into machine language (B) To translate high-level language code to machine language (C) To directly execute the program line by line (D) To check for syntax errors in high-level code 3. Which of the following is a feature of an interpreter? (A) It translates code line by line, executing each line immediately (B) It directly converts high-level code into machine code (C) It translates the entire program at once (D) It produces an intermediate code before execution 4. Which of the following statements is true about the difference between a compiler and an interpreter? (A) A compiler converts the entire program to machine code before execution, while an interpreter converts and executes code line by line (B) A compiler translates the code line by line, while an interpreter translates the entire code at once (C) An interpreter produces an executable file, while a compiler does not (D) A compiler executes code immediately, while an interpreter does not 5. Which of the following is NOT a characteristic of a compiler? (A) It executes the program immediately after translation (B) It checks and reports errors after analyzing the whole program (C) It translates high-level code into machine code directly (D) Faster execution after compilation 6. Which of the following best describes the operation of an assembler? (A) Converts high-level programming language into machine code (B) Converts assembly language into machine code (C) Executes machine code directly (D) Translates and executes high-level language code line by line 7. Which of the following is an advantage of using an interpreter over a compiler? (A) Faster execution of the program (B) Generates an executable file (C) More efficient in translating complex programs (D) Easier to debug, as it executes code line by line 8. Which of the following is true about an interpreter? (A) It translates the entire code at once (B) It produces an intermediate code file (C) It translates and executes code line by line (D) It cannot detect errors in the code 9. What is the primary output of an assembler? (A) An executable program (B) A bytecode file (C) A machine code file (D) An intermediate code file 10. Which of the following is true about the execution time of code compiled by a compiler compared to an interpreter? (A) The code executed by an interpreter is faster than the code compiled by a compiler (B) Both have the same execution time (C) The code executed by a compiler is faster than the code executed by an interpreter (D) It depends on the programming language used