Font size
Worksheetsclass 12 18/2/2022
Total questions: 10
Worksheet time: 20mins
If the elements “A”, “B”, “C” and “D” are placed in a stack 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
2
3
4
To add an element to a Queue, you use the (a) () method.
If you have a stack containing 'A' 'D' 'G' . What will happen if you push 'C' into the stack?
'C' Will be added on top of the stack
'C' Will be added from the bottom of the stack
'C' Will be removed from the stack
'C' Will not be added to the stack
The following operations are performed on a Stack.
s=Stack()
s.push(‘a’)
s.push(‘b’)
s.pop()
s.push(‘c’)
s.peek()
What is the top of the Stack s when these operations are complete?
'a'
'b'
'c'
Stack is empty
What is a dequeue operation?
Removes and returns the element from the front of the queue
Removes and returns the element from the rear of the queue.
Removes the element from the front of the queue.
Returns the element from the rear of the queue.
What is the value of the postfix expression 6 3 2 4 + – *?
1
40
70
-18
In order to modify data in a database we would use which SQL statement?
Update
Amend
Alter
Modify
Which SQL statement would add a record to the database?
INSERT INTO Designer VALUES ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456')
INSERT VALUES ('SMI01', 'M Smith', 'mail@msmith.com', 01224123456') INTO Designer
INSERT ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456') INTO Designer
INSERT Designer INTO VALUES (''SMI01', 'M Smith', 'mail@msmith.com', '01224123456')
Which statement allows us to add a record to a table?
Add To
Update To
Add Into
Insert Into
