6 - Classification of Programming Languages Flashcards

(11 cards)

1
Q

What is the role of interpreter software during program execution?

A

Interpreter software is resident in memory while the application program is run and translates each statement to machine code line-by-line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What might prevent the successful use of a freeware assembler on a computer?

A

The processor architecture or hardware platform is different, as assembler software is processor/architecture specific.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is one key difference between a compiler and an interpreter?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does the execution speed of object code compare to interpreted source code?

A

The object code produced by a compiler executes faster than interpreting the source code every time the program is run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is intermediate code?

A

Intermediate code is not directly executable and is run by a virtual machine or compiled into an executable just before running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the first and second generations of programming languages?

A

First: Machine Code; Second: Assembly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does it mean for a high-level language to be imperative?

A

An imperative language is one where the program is a sequence of instructions that are followed in order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define a declarative language and provide an example.

A

A declarative language specifies what the problem to be solved is without detailing how to solve it. Examples include functional and logic programming languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why are JavaScript programs executed in a web browser interpreted rather than compiled?

A

Because the type of processor in the user’s computer cannot be predetermined; JavaScript needs to run on various devices with different processors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is meant by the term low-level language?

A

A low-level language is close to the hardware and interacts directly with basic hardware tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Give one reason for the existence of many third-generation programming languages.

A

Languages are developed for specific problem types or to access specific data types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly