Classification Of Programming Languages Flashcards

1
Q

What is a processor instruction set?

A

It is a built-in set of binary (machine code) instructions that a processor understands.

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

Why were translation programs developed?

A

To make programming faster and less error-prone by converting human-readable code into machine code.

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

What are the three types of translator software?

A

Assembler: Converts assembly language into machine code.
Interpreter: Converts high-level code line by line into machine code.
Compiler: Converts the entire high-level code into machine code at once.

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

What is the main difference between a compiler and an interpreter?

A

A compiler translates the entire program before execution, while an interpreter translates and executes code line by line.

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

Why use an interpreter?

A

It is useful during development and for making programs portable across different architectures.

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

What are high-level languages?

A

Programming languages like Python, Java, and C, designed for human readability and productivity.

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

What is assembly language?

A

A low-level language closer to machine code but slightly more readable than binary.

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

Why are high-level languages preferred over low-level languages?

A

They are easier to read, write, debug, and maintain

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

What happens during compilation?

A

The source code is fully converted into machine code, which is saved for later execution.

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

What happens during interpretation?

A

A: Each line of source code is translated and executed immediately without generating a saved machine code file.

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

What is bytecode?

A

An intermediate language executed by a virtual machine (e.g., Java Virtual Machine). It is portable but slower than native machine code.

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

What are the advantages of compilers?

A

Faster execution since the code is precompiled and saved in machine code.

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

What are the disadvantages of interpreters?

A

Slower overall execution because translation happens during runtime.

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

Why use bytecode?

A

It enables platform independence, allowing the same code to run on multiple systems with a compatible virtual machine.

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