Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Batch 1 Quiz - DSA Lab

Total questions: 25

Worksheet time: 25mins

Name
Class
Date
1.

Process of adding an element to a stack is

a)

Create

b)

Push

c)

Evaluation

d)

Pop

2.

Process of removing an element from the stack

a)

Create

b)

Push

c)

Evaluation

d)

Pop

3.

Stack Data Structure is

a)

FIFO

b)

None of these

c)

LILO

d)

LIFO

4.

LEMON     ----- Top
ROSE
CARROT
CORN
TULIP

After three POP operations have been performed on the above stack, the three items, in order, which will be taken out of the stack are

a)

LEMON, ROSE, CARROT

b)

ROSE, CARROT, CORN

c)

TULIP, CORN, CARROT

d)

CARROT, CORN, TULIP

5.

A stack is a data structure in which elements

a)

can be added to any position and removed only from the top

b)

can be only added to the top and removed from any position

c)

can be added and removed from the top only

d)

can be added and removed from any position

6.

Which of the following statements is a specification of a set of data and the set of operations that can be performed on the data?

a)

Library

b)

ADT

c)

Package

d)

Tracer

7.

Only top element can be accessed in stack

a)

TRUE

b)

FALSE

8.

Stacks have LIFO ordering

a)

TRUE

b)

FALSE

9.

LIFO stands for

a)

List of Outputs

b)

Last in First Out

c)

First in Last Out

d)

None of them

10.

Select a real life situation implement stack

a)

All of the answers

b)

The cars a garage the first car in will be the last car out of the garage

c)

The batteries in a flashlight

d)

The person wear bangles

11.

The number of swaps made by selection sort algorithm in each iteration is _________

a)

1

b)

N

c)

N-1

d)

depends on the input

12.

The quick sort algorithm splits the list into equal halves in each and every partitioning. State true or false.

a)

True

b)

False

13.

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?

a)

ABCD

b)

DCBA

c)

ABDA

d)

ABDC

14.

Let size of queue is 4. The following operations are performed in order.

enqueue(10)

enqueue(20)

enqueue(30)

enqueue(40)

what will be the result after executing enqueue(50)?

a)

Queue Empty

b)

Queue Full

c)

None

d)

5

15.

A normal queue, if implemented using an array of size MAX_SIZE, gets full when

a)

Rear = MAX_SIZE – 1

b)

Front = (rear + 1)mod MAX_SIZE

c)

Front = rear + 1

d)

Rear = front

16.

In Queue Insertion & Deletion take place at ________________.

a)

same end

b)

first end

c)

different end

d)

last end

17.

One difference between a queue and a stack is:

a)

Queues require dynamic memory, but stacks do not

b)

Stacks require dynamic memory, but queues do not.

c)

Queues use two ends of the structure; stacks use only one.

d)

Stacks use two ends of the structure, queues use only one.

18.

The situation when in a linked list Head==NULL

is

a)

Full

b)

Empty

c)

Half full

d)

saturated

19.

The doubly linked list would have how many fields in a node?

a)

1

b)

2

c)

3

d)

4

20.

Linked list is a collection of

a)

Nodes

b)

Arrays

c)

Address

d)

None

21.

Node consists of

a)

Address and Pointer

b)

Data

c)

Data and Address

d)

Pointer and Address

22.

Doubly Linked List Consists of

a)

1-Data , 1- Address

b)

2-Data , 1- Address

c)

1-Data , 0- Address

d)

1-Data , 2- Address

23.

--------------------- is used to define a linked list in C Programming

a)

Arrays

b)

Structures

c)

Functions

d)

None

24.

We can see linked list applications in

a)

Movies

b)

Library

c)

Matrix Representation

d)

Web Pages

25.

Which the following circular linked list

a)
b)
c)