Practice free →
HomeIBPS ClerkComputer AwarenessSoftware › Which statement correctly distinguishes an inter…

Which statement correctly distinguishes an interpreter from a compiler?

AAn interpreter produces a portable machine code file
BAn interpreter is used only for assembly language
CAn interpreter is needed every time the source code is executed
DAn interpreter removes all syntax errors automatically
Answer & Solution
Correct answer: C. An interpreter is needed every time the source code is executed
1. A compiler translates the entire program once, after which it can be set aside. 2. An interpreter translates one line at a time instead of the whole program at one go. 3. It converts a line, runs it if the syntax is correct, then repeats for every remaining line. 4. Because translation happens during execution, the interpreter is always needed whenever the source code is to be executed. 5. Option C describes an assembler; option D describes a debugger, which detects errors but does not fix them on its own. _Source: NCERT Computer Science Class 11, Ch 1 'Computer System', S1.7.3 Programming Tools_
Solve this in the app — IBPS Clerk practice & 24k+ MCQs →
Related questions