6 - Classification of Programming Languages Flashcards
(11 cards)
What is the role of interpreter software during program execution?
Interpreter software is resident in memory while the application program is run and translates each statement to machine code line-by-line.
What might prevent the successful use of a freeware assembler on a computer?
The processor architecture or hardware platform is different, as assembler software is processor/architecture specific.
What is one key difference between a compiler and an interpreter?
A compiler produces object code, while an interpreter does not.
Compilers translate the entire source code at once, whereas interpreters do so line by line.
How does the execution speed of object code compare to interpreted source code?
The object code produced by a compiler executes faster than interpreting the source code every time the program is run.
What is intermediate code?
Intermediate code is not directly executable and is run by a virtual machine or compiled into an executable just before running.
What are the first and second generations of programming languages?
First: Machine Code; Second: Assembly.
What does it mean for a high-level language to be imperative?
An imperative language is one where the program is a sequence of instructions that are followed in order.
Define a declarative language and provide an example.
A declarative language specifies what the problem to be solved is without detailing how to solve it. Examples include functional and logic programming languages.
Why are JavaScript programs executed in a web browser interpreted rather than compiled?
Because the type of processor in the user’s computer cannot be predetermined; JavaScript needs to run on various devices with different processors.
What is meant by the term low-level language?
A low-level language is close to the hardware and interacts directly with basic hardware tasks.
Give one reason for the existence of many third-generation programming languages.
Languages are developed for specific problem types or to access specific data types.