Font size
WorksheetsOCR A Level Computer Science - 1.4.x
Total questions: 67
Worksheet time: 34mins
5.23 would be stored as:
Integer
Real Number
String
Character
Boolean
What is >= ?
What is < ?
Comparison Operators
What is A > B?
A greater than B
A less than B
Greater than or equal to
Less than or equal to
What is <= ?
What is && ?
What is != ?
What is == ?
Arithmetic Operators What is a/c ?
Addition
Subtraction
Division
Modulo
5 would be stored as:
Integer
Real Number
String
Character
Boolean
M / F would be stored as:
Integer
Real Number
String
Character
Boolean
"The cat sat on the mat" would be stored as:
Integer
Real Number
String
Character
Boolean
Conversion of one data type to another e.g.
age = "30" # this is a string!
YearsOld=int(age)
is known as...?
Declaring
Assigning (or Assignment)
Casting
Concatenation
Which of these is not a data structure?
Stack
Array
Integer
List
Which of these are operations of a stack?
Push
Add
Remove
Pop
A stack is last in, "what" out?
(a)
A queue is what?
Last in, first out
First in, first out
First in, last out
Last in, last out
What is the value of the ROOT node in this Tree?
35
24
42
20
In this tree, where would the new value "7" be placed?
On the left branch of "4"
On the right branch of "6"
On the left branch of "15"
Over the top of the current number "5"
What is returned by values[5]?
9
12
6
8
{2, 3, 5, 8, 9, 11};
How would you access the fourth element in nums
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
ABCD
DCBA
DCAB
ABDC
Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the no of element present on stack are
1
3
2
4
Records allow you to store more than one data type
True
False
What advantage does a linked list have over an array?
Size of the list doesn't need to be mentioned at the beginning of the program
You can add or remove elements from the middle of the list.
The linked list doesn't have a size limit
All of these are true.
A hash table is
an abstract data structure
an array
an integer
made of pine
when an algorithm generates the same address for different primary keys it is known as
Knock
Bang
Collisions
DoubleHash
Hashing gives each item
A sequential address
A logarithmic address
No address
A unique address
When a collision occurs with a hashing function, what is one method for dealing with the collisions?
creating a new linked list at that index
creating a new array
creating a new hash table
creating a new binary tree
¬¬A =
A
1
0
¬A
A ∧ A =
A
1
0
¬A
A ∧ ¬A =
A
1
0
¬A
A ∧ 1 =
A
1
0
¬A
A ∧ 0 =
A
1
0
¬A
A v A =
A
1
0
¬A
A v ¬A =
A
1
0
¬A
A v 1 =
A
1
0
¬A
A v 0 =
A
1
0
¬A
A v AB =
A
1
0
¬A
Applying DeMorgan's rule to:
¬(A v B) gives
¬(A v B)
¬A v ¬B
¬A ∧ ¬B
¬(A ∧ B)
Applying DeMorgan's rule to:
¬(A ∧ B) gives
¬(A v B)
¬A v ¬B
¬A ∧ ¬B
¬(A ∧ B)
Which of the following are logic gates?
AND
Switch
IF
Else
OR
Which logic gate is shown here?
OR
NOT
AND
NAND
What would the ouput(z) be if the inputs were the following?
A=1
B=0
0
1
Which logic gate is shown here?
AND
OR
XOR
NAND
What would the output (z) be if the inputs were the following?
A=1
B=0
0
1
Which logic gate is associated with the truth table?
NAND
OR
NOT
AND
Which logic gate is represented by the following symbol, ¬ ?
AND
OR
NOT
NAND
Which logic gate is represented by the following symbol, V ?
NAND
AND
OR
NOT
Which logic gate is associated with the following truth table?
AND
NAND
OR
OR
The OUTPUT of which logic gate will be O, if there is more than 1 INPUT switched ON.
AND
OR
XOR
NAND
What is the output of a NAND gate if both its inputs are 1?
0
1
Which logic gate can be represented by the following symbol, ^?
OR
NOT
AND
Which logic gate is associated with the truth table?
AND
OR
NAND
NOR
What would the OUTPUT(x) be in the following scenario:
A = 1
B = 0
C= 0
0
1
What is the OUTPUT in the logic diagram?
0
1
Look at the truth table below and choose the correct option.
False, False
True, False
False,True
True,True
Which logic gate does this symbol represent?
NAND
NOR
OR
XOR
Which logic gate does this symbol represent?
NOR
OR
XOR
NAND
What would the OUTPUT be in the following scenario?
A=0
B=0
C=0
0
1
How could this logic expression also be written?
P=Av¬B
P= A AND B
P= A AND ( NOT B)
P=A OR (NOT B)
P=A OR B
