wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DSA #01

Total questions: 20

Worksheet time: 15mins

Name
Class
Date
1.

Principle of Stack

a)

LILO

b)

FILO

c)

LIFO

d)

FIFO

2.

Queue follows

a)

FIFO

b)

LIFO

c)

FILO

d)

LILO

3.

ADT means

a)

Abstract Define Type

b)

Abstract Data Term

c)

Additive Data Technique

d)

Abstract Data Type

4.

Convert the following infix into post fix. (a + b) * (c - d)

a)

ab+*cd-

b)

ab+cd*-

c)

ab+cd-*

d)

ab+cd*-

5.

Convert the following infix into prefix. a+b/d

a)

+/abd

b)

a+/bd

c)

+a/bd

d)

/+abd

6.

convert the following infix into post fix. (a+b/e)*(d+f)

a)

*/+abe+df

b)

*+abe/+df

c)

ab+e/df+*

d)

abe+/df+*

7.

what happens next?

push 2; push -1; push 54; pop; push 71; pop; push 100; pop

a)

-1, 2

b)

2, -1

c)

empty

d)

full

8.

Process of inserting an element in stack is called ____________

a)

Create

b)

Push

c)

Pop

d)

Top

9.

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

a)

1

b)

14

c)

74

d)

-18

10.

To represent hierarchical relationship between elements, Which data structure is suitable?

a)

Queue

b)

Tree

c)

Graph

d)

Priority

11.

What happens if we try to pop from an empty stack?

a)

Underflow

b)

Overflow

c)

Segmentation fault

d)

No error

12.

What is the drawback of using a simple queue using arrays?

a)

Insertion is not possible

b)

Memory is wasted

c)

Deletion is not possible

d)

Front and rear can’t be updated

13.

Which data structure is used for converting infix expression to postfix expression?

a)

Queue

b)

Linked List

c)

Stack

d)

Tree

14.

In infix to postfix conversion, how is operator precedence handled?

a)

Operators with lower precedence are processed first

b)

Precedence doesn’t matter in postfix

c)

Operators with higher precedence are pushed to stack first

d)

Operands are pushed based on precedence

15.

How are operands handled in postfix expression evaluation?

a)

Always added to a queue

b)

Stored in a tree

c)

Pushed to a stack

d)

Ignored

16.

What is the postfix evaluation result of the expression: 10 2 8 * + 3 -?

a)

23

b)

27

c)

19

d)

9

17.

Which of the following is NOT true about postfix expressions?

a)

Parentheses are not required

b)

Evaluation can be done using a stack

c)

Operands are written in the order they appear

d)

Operators appear before their operands

18.

Which of the following is the correct broad classification of data structures?

a)

Static and Dynamic

b)

Primitive and Non-Primitive

c)

Linear and Non-Linear

d)

Arrays and Linked Lists

19.

What is the key feature that distinguishes linear from non-linear data structures?

a)

Elements stored in fixed size

b)

Elements are stored sequentially

c)

Elements are accessed randomly

d)

Elements are of same data type

20.

Dynamic data structures are:

a)

Allocated at compile time

b)

Fixed in size

c)

Allow flexible memory usage

d)

Faster than arrays always