Programming Languages Flashcards

1
Q

What does a compiler do with a whole file?

A

Reads in a whole file and translates it at once.

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

Compiler & Interpreter definition

A

A translator that converts high-level language source code into object code, often machine code.

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

Object code

A

The translated source code.

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

Assembler

A

Translates the mnemonics of assembly language programs into machine language instructions for the microprocessor to carry out.

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

What does a compiler produce?

A

Produces an executable file.

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

Can the end-user see the programming source code in compiled languages?

A

No, the end-user cannot see the programming source code.

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

Is additional software needed to run compiled code?

A

No, compiled code does not need an additional environment/software to run.

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

Are executable files from compilers portable?

A

Executable file is portable between machines with the same architecture and operating systems.

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

What does an interpreter do line-by-line?

A

Reads, translates, and executes one line at a time.

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

What does an interpreter require to run code?

A

A special environment is needed to be installed on the user’s machine to run the code; this is machine specific.

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

Can the end-user see the programming source code in interpreted languages?

A

Yes, the end-user can see the programming source code.

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

Is source code from an interpreter portable?

A

Source code is portable to any machine with an interpreter which can run on it.

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

What is a similarity between compilers and interpreters related to code translation?

A

One line of a compiled language maps to multiple executable instructions.

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

What do both compilers and interpreters do?

A

Both are used to interpret high level programming languages.

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

What do both compilers and interpreters produce?

A

Both produce machine code from human-readable source code.

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

What is a key difference in how compilers and interpreters read code?

A

Compiler reads in a whole file and translates it at once. Interpreter reads, translates and executes one line at a time.

17
Q

Does an interpreter produce an executable file?

A

No, an interpreter does not produce an executable file.

18
Q

What is the portability difference between compiled and interpreted code?

A

Compiled executable runs on machines with same architecture and OS. Interpreted source code runs on any machine with interpreter.

19
Q

Does compiled code require additional software to execute?

A

No, compiled code does not require additional software to execute.

20
Q

Does interpreted code require additional software to execute?

A

Yes, an interpreter needs a special environment installed on the user’s machine.

21
Q

Instruction set

A

The list of all possible commands a particular CPU knows how to carry out.

22
Q

Machine code

A

The binary codes representing each of the instructions in the instruction set.

23
Q

Translator

A

A program that converts source code into machine code.

24
Q

Source code

A

The text of the program that a programmer writes.

25
Assembly language
A low level programming language written using mnemonics.
26
Low level programming language
A programming language that is closely related to the CPU's machine code.