Programmin languages Flashcards

1
Q

What is a high level language?

A

High level languages are languages that are close to the spoken and written language of the programmer. They need to be translated into machine code through a compiler, interpreter or assembler.

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

What is source code?

A

Any code written in a high level language.

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

What are the advantages of a high level language?

A

Makes writing easier as commands are closer to English
One instruction translates into many machine code instructions
Code will run on different processors
The programmer has lots of data structures to use
Quicker and easier to understand

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

What are the disadvantages of a high level language?

A

Less memory efficient

Code is slower to execute as needs to be translated

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

What is a low level language?

A

A group of languages that operate directly on the physical CPU. The most basic from of programming language.
e.g. machine code and assembly code

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

What are the advantages of low level languages?

A

Used in embedded systems where it is necessary to to instruct hardware directly
The programmer works with the memory directly
More memory efficient
Faster to execute

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

What are the disadvantages of low level languages?

A

Code will work on one type of processor
Code is much harder to understand and write (slower to program and more expensive as requires someone with the right expertise)
Difficult to debug and maintain

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

What is a translator?

A

A translator converts a program into binary code that a computer can decode and execute.

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

What is a compiler?

A

Translates source code from a high level language into object code than machine code to be processed by the CPU.

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

Describe a feature of the compiler

A

The whole program is translated to machine code before its run.

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

What are disadvantages of the compiler?

A

Programs will not run with syntax errors
If code is changed then it needs to be recompiled
It is designed for a specific type of processor

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

What are advantages of a compiler?

A

No need for translation software at runtime
Executed quickly
Source code is kept secret

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

What is an interpreter?

A

Translates high level source code into machine code to be processed by the CPU

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

What is a feature of an interpreter?

A

Translates code line by line as the program runs

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

What is an advantage of an interpreter?

A

Code will run and will only stop if a syntax error is found.
Programs do not need to be recompiled so its easier to try out commands
Code is optimised
Not designed for s specific type of processor

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

What are the disadvantages of an interpreter?

A

Translation software is needed at run time
It is slowly executed
Code is not optimised
Source code is not hidden

17
Q

What is an IDE?

A

A suit of tools that help the programmer write error free and maintainable code
Integrated development environment

18
Q

What can IDE’s help with?

A

Runtime environment and output window
Editor with key words in source code
Comment out and indent sections of code
Debugging tools