hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    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

    CDP Subject Test 01

    languageIcon English
    • pdpQsnIcon20 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon20 Mins
    languageIcon English
    Free
    Must Attempt

    EVS Subject Test 01

    languageIcon English
    • pdpQsnIcon20 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon20 Mins
    languageIcon English
    Free
    Must Attempt

    CTET Paper-I PYP (07 July 2024)

    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
    289k+ students have already unlocked exclusive benefits with Test Prime!
    Our Plans
    Monthsup-arrow