2.5 Flashcards

(16 cards)

1
Q

What is a high-level programming language?

A

A language designed to be easy for humans to read and write (e.g. Python, Java, C#).

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

What is a low-level language?

A

A language that is, or is close to, machine code, like assembly language.

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

Give two advantages of high-level languages.

A
  1. Easier to write, read, and debug.
  2. Programs are portable between different hardware and devices.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give two disadvantages of high-level languages.

A
  1. Slower to execute than low-level languages.
  2. Must be translated into machine code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Give two advantages of low-level languages.

A
  1. Faster and more efficient to execute.
  2. Gives more control over hardware, including direct control of the registers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give two disadvantages of low-level languages.

A
  1. Harder to read, write, and maintain.
  2. Not portable - specific to one type of processor.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why do programs need translators?

A

Because computers can only understand machine code (binary).

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

What does a compiler do?

A

Takes a high-level program as source code, checks it for errors, and translates the entire program at once, creating an executable file.

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

What does an interpreter do?

A

Translates high-level programs into machine code statements line-by-line, which are then immediately executed.

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

True or false: interpreters generate machine code directly.

A

False. They call appropriate machine code subroutines within their own code to carry out statements.

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

Which is faster during execution: compilers or interpreters?

A

Compiler - after compiling, the program runs quickly.

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

Can a compiler create a separate machine code file?

A

Yes - the code is saved as an executable file and can be run again without recompiling.

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

Is machine code portable across devices?

A

No - it only works on the specific processor it was compiled for.

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

What is an Integrated Development Environment (IDE)?

A

An IDE is a platform containing features which help programmers write clear and maintainable code.

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

What are some features of an IDE?

A

Auto-indentation, auto-suggestion, auto-correction, line numbers, debugging tools, variable tracing, interpreters, error diagnostics, and a runtime environment.

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

What are run-time environments?

A

Run-time environments use virtual machines to allow programs to run on several types of machine/device which they were not designed to run on.