What is the major difference between an interpreter and a compiler?

University of Ilorin COS101 2026-exam past question

  1. An interpreter converts the whole program at once, while a compiler does it line by line
  2. An interpreter translates and executes code line by line, while a compiler translates the entire program before execution
  3. A compiler is only used for high-level languages, while an interpreter is only for machine code
  4. There is no difference as they both perform the same task at the same speed

Register free to see the answer and step-by-step explanation

More University of Ilorin COS101 2026-exam past questions

Related questions

SmartDriller logo

SmartDriller

Loading your past questions, mock exams, notes, and video tutorials...

Starting up…