Question

What is an interpreter?

A.

A program that converts machine language to high-level language.

B.

A program that converts whole of a program code into machine language in one step.

C.

A program that converts a program into machine code line by line as the program is run.

D.

A program that writes instructions to perform.

Correct option is C


An interpreter is a program that converts a program into machine code line by line as the program is run. It reads and executes the code one line at a time, translating each line into machine code and executing it immediately. This allows for interactive execution, making it useful in scripting and debugging.
Important Key Points:
1. Line-by-Line Execution: Unlike a compiler, which translates the entire program into machine code before execution, an interpreter processes the program one line at a time.
2. Immediate Execution: The interpreter executes the code as it translates it, so there is no separate executable file created.
3. Popular Languages: Interpreters are commonly used in languages like Python, JavaScript, and Ruby.
Knowledge Booster:
· Option (a): This is incorrect because an interpreter does not convert machine language to a high-level language; it works in the opposite direction—translating high-level language into machine code.
· Option (b): This is a description of a compiler, not an interpreter. A compiler translates the entire program into machine code in one step before execution.
· Option (d): This is incorrect because a program that "writes instructions to perform" refers to a program that generates machine code, but not specifically an interpreter.

Free Tests

Free
Must Attempt

UPTET Paper 1: PYP Held on 23rd Jan 2022 (Shift 1)

languageIcon English
  • pdpQsnIcon150 Questions
  • pdpsheetsIcon150 Marks
  • timerIcon150 Mins
languageIcon English
Free
Must Attempt

UPTET Paper 2 Social Science : PYP Held on 23rd Jan 2022 (Shift 2)

languageIcon English
  • pdpQsnIcon150 Questions
  • pdpsheetsIcon150 Marks
  • timerIcon150 Mins
languageIcon English
Free
Must Attempt

UPTET Paper 2 Maths & Science : PYP Held on 23rd Jan 2022 (Shift 2)

languageIcon English
  • pdpQsnIcon150 Questions
  • pdpsheetsIcon150 Marks
  • timerIcon150 Mins
languageIcon English
test-prime-package

Access ‘EMRS PGT’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
354k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow