Font size
S
M
L
XL
Worksheets1.2.4. Types of Programming Language
Total questions: 12
Worksheet time: 6mins
Name
Class
Date
1.
What are programming paradigms?
a)
Different approaches to using a programming language to solve a problem
b)
Different forms of critical thinking
c)
Using one algorithm for different outcomes
2.
Which two broad categories are programming paradigms split into?
a)
Imperative
b)
Declarative
c)
Event Driven
d)
Procedural
e)
Object Orientated
3.
State the advantages of procedural programming
a)
Can be applied to a wide range of problems.
b)
Relatively easy to write and interpret.
c)
Reuse of code through inheritance
d)
Flexibility through polymorphism
4.
State a use of declarative programming
a)
Expert Systems/ Knowledge-based Systems.
b)
Artificial Intelligence
c)
Sequential Execution
d)
Machine Architecture
5.
Identify the main programming structures used in structured programming
a)
Sequence
b)
Selection
c)
Iteration
d)
Recursion
e)
Encapsulation
6.
How does assembly language differ from machine code?
a)
Assembly language uses mnemonics rather than binary. One line in assembly language is equal to one line in machine code.
b)
Assembly language uses binary rather than mnemonics. One line in assembly language is equal to one line in machine code.
c)
Assembly language uses mnemonics rather than binary. One line in assembly language is equal to multiple lines in machine code.
d)
Assembly language uses mnemonics rather than binary. Multiple lines in assembly language is equal to one line in machine code.
e)
Assembly language uses binary rather than mnemonics. One line in assembly language is equal to multiple lines in machine code.
7.
What is the function of the STA mnemonic?
a)
Storing the value in the Accumulator at the given memory address.
b)
Branches to a given address if the value in the Accumulator is positive. It is a conditional branch.
c)
it is meant to move data between registers and memory.
d)
The operands will usually name another register to use as the load address, plus perhaps a 3rd register to be added or scaled and added, or a constant, or all of them above.
8.
What is the function of the BRP mnemonic?
a)
Branches to a given address if the value in the Accumulator is positive. It is a conditional branch.
b)
Storing the value in the Accumulator at the given memory address.
c)
it is meant to move data between registers and memory.
d)
The operands will usually name another register to use as the load address, plus perhaps a 3rd register to be added or scaled and added, or a constant, or all of them above.
9.
State the function of the opcode and operand
a)
The opcode specifies the instruction to be performed and the addressing mode.
b)
The operand holds a value which is related to the data on which the instruction is to be performed.
c)
The opcerand specifies the instruction to be performed and the addressing mode.
d)
The opcode holds a value which is related to the data on which the instruction is to be performed.
10.
Identify different addressing modes
a)
Immediate Addressing
b)
Direct Addressing
c)
Indirect Addressing
d)
Indexed Addressing
11.
What is a class?
a)
A template for an object that defines the state and behaviour of an object. An object is an instance of a class.
b)
a variable, a data structure, a function, or a method, and as such, is a value in memory referenced by an identifier.
c)
a procedure associated with a message and an object
d)
a class is a specification that defines a property of an object, element, or file.
12.
Identify disadvantages of Object Oriented Languages
a)
Requires a different style of thinking which can be difficult for programmers accustomed to other paradigms to pick up.
b)
OOP may not be suited to all types of problems.
c)
Generally unsuitable for smaller problems
d)
inability to reuse code
Reset
