CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Computer Hardware and Software
A start-up's developer writes a program in Python, which is run by an interpreter. Compared with a compiled language such as C, which statement about the interpreter is correct?
An interpreter translates and executes source code statement by statement while the program runs. A compiler instead converts the entire program into machine code before execution starts, so the first option describes a compiler, not an interpreter.
- AIt translates the whole program into machine code before any execution begins
- BIt translates and executes the source code statement by statement during run timeCorrect
- CIt converts the program into assembly language only and cannot run it
- DIt is used only for writing operating systems
Explanation
An interpreter reads, translates and executes source code line by line at run time, so errors appear when the faulty statement is reached. A compiler translates the entire program first, which is the behaviour described in the first distractor.
Did you get it right without looking?
One question tells you little. A timed set on Computer Hardware and Software shows your real accuracy, how long you take and where you lose marks.
More Computer Hardware and Software questions
- A company secretary notes that the firm's payroll package, which is bought as a ready-made product and used for calculating salaries, falls …
- Under the Information Technology Act, 2000, a person dishonestly copies data from a computer system of a firm without the owner's permission…
- A Bengaluru start-up wants to run its own customer database on virtual machines rented from a cloud vendor, installing and patching the oper…
- A firm distributes software whose source code is publicly available under a licence permitting users to study, modify and redistribute it. T…
- Under the Information Technology Act, 2000, tampering with computer source code is an offence when the code is required to be kept or mainta…
- A company secretary is told that the server's CPU fetches an instruction from memory, decodes it and then carries it out. Which component of…