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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Advantages of high-level languages

A
  • Portable.
  • Easy to understand.
  • Many libraries for pre-written code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is immediate addressing mode?

A
  • Operand specifies a value which will be used in the operation.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is indexed addressing mode?

A
  • Operand specifies the address of a memory location which is the beginning of an array.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly