1.2.4 Types of Programming Language Flashcards
(9 cards)
1
Q
What is the difference between imperative and declarative paradigms?
A
- Imperative has programmers write code that dictates how a problem should be solved. e.g C
- Declarative has programmers define what should be achieved by the program. e.g. SQL
2
Q
Characteristics of high level languages
A
- Code is portable
- Programs are problem-oriented rather than machine-oriented.
- High levels of abstraction.
- Syntax is easy for humans to understand.
- Single line of code can accomplish multiple tasks.
3
Q
Advantages of high-level languages
A
- Portable.
- Easy to understand.
- Many libraries for pre-written code.
4
Q
What is immediate addressing mode?
A
- Operand specifies a value which will be used in the operation.
5
Q
What is direct addressing mode?
A
- Operand specifies the address of a memory location, the contents of which will be used in the operation.
6
Q
What is indirect addressing mode?
A
- Operand specifies the address of a memory location. the contents of which contains an address to another memory location whose contents will be used in the operation.
7
Q
What is indexed addressing mode?
A
- Operand specifies the address of a memory location which is the beginning of an array.
8
Q
What is relative addressing mode?
A
- Operand specifies a value to be added to the address of the current instruction.
- Used in branching.
9
Q
Advantages and uses of low level languages
A
- Used for embedded systems and device drivers.
- Allow programmer to created optimised programs with limited resources.