wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

class 12 18/2/2022

Total questions: 10

Worksheet time: 20mins

Name
Class
Date
1.

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?

a)

ABCD

b)

DCBA

c)

DCAB

d)

ABDC

2.

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

a)

1

b)

2

c)

3

d)

4

3.

To add an element to a Queue, you use the (a)   () method.

4.

If you have a stack containing 'A' 'D' 'G' . What will happen if you push 'C' into the stack?

a)

'C' Will be added on top of the stack

b)

'C' Will be added from the bottom of the stack

c)

'C' Will be removed from the stack

d)

'C' Will not be added to the stack

5.

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)

'a'

b)

'b'

c)

'c'

d)

Stack is empty

6.

What is a dequeue operation?

a)

Removes and returns the element from the front of the queue

b)

Removes and returns the element from the rear of the queue.

c)

Removes the element from the front of the queue.

d)

Returns the element from the rear of the queue.

7.

What is the value of the postfix expression 6 3 2 4 + – *?

a)

1

b)

40

c)

70

d)

-18

8.

In order to modify data in a database we would use which SQL statement?

a)

Update

b)

Amend

c)

Alter

d)

Modify

9.

Which SQL statement would add a record to the database?

a)

INSERT INTO Designer VALUES ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456')

b)

INSERT VALUES ('SMI01', 'M Smith', 'mail@msmith.com', 01224123456') INTO Designer

c)

INSERT ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456') INTO Designer

d)

INSERT Designer INTO VALUES (''SMI01', 'M Smith', 'mail@msmith.com', '01224123456')

10.

Which statement allows us to add a record to a table?

a)

Add To

b)

Update To

c)

Add Into

d)

Insert Into