Ask Question
30 October, 00:23

How is an interpreter different from a compiler?

a: An interpreter translates and executes code line by line, while a compiler translates all code at once so that it is ready to be executed at any time.

b: An interpreter translates all code at once so that it is ready to be executed at any time, while a compiler translates and executes code line by line.

c: An interpreter translates programming code into binary language, while a compiler does not.

d: An interpreter translates binary language into programming language, while a compiler translates programming language into binary language.

+2
Answers (2)
  1. 30 October, 00:37
    0
    Option A is correct answer, which is, an interpreter translates and executes code line by line, while a compiler translates all code at once so that it is ready to be executed at any time.

    Further Explanation

    • Both, compiler and interpreter used to run program with few differences like interpreter executes line by line while compiler runs program at once.

    • If there is no error in the program then compiler will convert source code into machine code which runs faster as compared to interpreters.

    • Interpreters executes code run line by line if error occurs, it must be rectified before proceeding to next line while compilers runs whole code.

    Answer details

    Grade: Middle

    Subject: Computers and Technology

    Keywords: compiler, interpreter, code execution etc
  2. 30 October, 03:59
    0
    An interpreter translates and executes code line by line, while a compiler translates all code at once so that it is ready to be executed at any time.

    Explanation:

    Some other differences between the both are:

    * An interpreter always translates the program one statement at a time while compiler scans the entire programs and converts it into machine code as a whole.

    *Interpreters are efficient because no intermediate object is created while compilers generate intermediate object code which further requires linking.

    *Interpreters do not save the machine code while compilers store the machine code on the disk.

    Tags: difference between interpreter and compiler
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “How is an interpreter different from a compiler? a: An interpreter translates and executes code line by line, while a compiler translates ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers