wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

FSA_DSA_QUIZ_Jan'24

Total questions: 53

Worksheet time: 2hrs 46mins

Name
Class
Date
1.

People have used the word ________ to mean computer information that is transmitted or stored.

a)

Beta

b)

Data

c)

Database

d)

None of above

2.

_____________ specifies how we enter data into our programs and what type of data we enter.

a)

data type

b)

data

c)

datum

d)

all of above

3.

Array is ___________ data type.

a)

user defined

b)

primary

c)

derived

d)

all of above

4.

In ____________ data structure, the data items are arranged in a linear sequence.

a)

linear

b)

non linear

c)

both a and b

d)

all of above

5.

In ___________ data structures all elements may or may not be of same type.

a)

linear

b)

non linear

c)

homogeneous

d)

non- homogeneous

6.

Stack uses __________ data structure as the element that was inserted last is the first one to be taken out.

a)

LIPO

b)

FIFO

c)

LIFO

d)

FIPO

7.

Full form of LIFO is ____________

a)

Last Inside First Outside

b)

Last Innner First Outer

c)

Last In First Out

d)

Last Impact First Out

8.

Every stack has a variable _________ associated with it.

a)

TOP

b)

BOT

c)

POT

d)

none of the above

9.

_________ operation removes the element from the top of the stack.

a)

push

b)

pop

c)

update

d)

none of the above

10.

_________ operation changes the value of element given by user of the stack.

a)

push

b)

pop

c)

peep

d)

update

11.

A function calls itself is called ___________.

a)

queue

b)

recursion

c)

function

d)

none of above

12.

Complex data structures built on top of linked lists, that use First-In First-Out behaviour, are called ___

a)

vectors

b)

strings

c)

queues

d)

stacks

13.

In a stack, if a user tries to remove an element from empty stack it is called _________

a)

Underflow

b)

Empty collection

c)

Overflow

d)

Garbage Collection

14.

User perform following operations on stack of size 5 then -

push(1);

pop();

push(2);

push(3);

pop();

push(2);

pop();

pop();

push(4);

pop();

pop();

push(5);

a)

Overflow Occurs

b)

Stack Operations will be performed Smoothly

c)

Underflow Occurs

d)

None of these

15.

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

a)

1

b)

40

c)

74

d)

-18

16.

The following postfix expression with single digit operands is evaluated using a stack:

8 2 3 ^ / 2 3 * + 5 1 * -

a)

6,1

b)

5,7

c)

3,2

d)

1,5

17.

To evaluate an expression without any embedded function calls:

a)

One stack is enough

b)

Two stacks are needed

c)

As many stacks as the height of the expression tree are needed

d)

A Turing machine is needed in the general case

18.

What will be the postfix form of the above expression -

(A+B)∗(C∗D-E)∗F/G

a)

None of these

b)

A B + C D ∗ E − F G ∗ / ∗

c)

A B + C D E ∗ − F G / ∗ ∗

d)

A B + C D ∗ E − F G / ∗ ∗

19.

Which one of the following is an application of Stack Data Structure?

a)

Managing function calls

b)

The stock span problem

c)

Arithmetic expression evaluation

d)

All of the above

20.

The following postfix expression with single digit operands is evaluated using a stack:

Note that ^ is the exponentiation operator. The top two elements of the stack after the first * is evaluated are:

a)

6,1

b)

5,7

c)

3,2

d)

1,5

21.

If the sequence of operations - push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop are performed on a stack, the sequence of popped out values

a)

2,2,1,1,2

b)

2,2,1,2,2

c)

2,1,2,2,1

d)

2,1,2,2,2

22.

Which of the following is not an inherent application of stack?

a)

Implementation of recursion

b)

Evaluation of a postfix expression

c)

Job scheduling

d)

Reverse a string

23.

What advantage does a linked list have over an array?

a)

Size of the list doesn't need to be mentioned at the beginning of the program

b)

You can add or remove elements from the middle of the list.

c)

The linked list doesn't have a size limit

d)

All of these are true.

24.

Nodes in a linked list contain two things

a)

Direction and a pointer

b)

Data and a pointer

c)

A Pointer and a reference

d)

A pointer and a node

25.

The situation when in a linked list Head==NULL

is

a)

Full

b)

Empty

c)

Half full

d)

saturated

26.

In the above image what will be printed when Head->next->data?

a)

83

b)

9

c)

27

d)

Error

27.

Complete the code in the red column

a)

string info; int link;

b)

int info; NodeType link;

c)

int info; string link;

d)

int info; NodeType * link;

28.

Which of the following statement is not correct?

a)

List is a linear structure

b)

There are 2 example of list, Array List & Linked List.

c)

Array List is not an example of List

d)

List contains a sequence of elements

29.

What is value in the head -> next -> next below?

a)

12

b)

4600

c)

1600

d)

88

30.

How to delete node B?

a)

head->next=TempPtr; free(TemPtr);

b)

free(TemPtr); head->next=TempPtr->next;

c)

head->next=TempPtr->next;free(TemPtr)r;

d)

free(head); head->next= TempPtr->next

31.

How many times should


“temp =temp->next” be executed in the image to get the value of "Null" when the initial value of temp is temp=head

a)

1

b)

2

c)

3

d)

4

32.

How many null pointers exists in a circular linked list?

a)

0

b)

1

c)

2

d)

3

33.

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

a)

Arrays

b)

Structures

c)

Functions

d)

None

34.

Circular Linked List will be

a)

Only Singly

b)

Only Doubly

c)

Singly and Doubly

d)

None

35.

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

36.

Which of the following is a valid way

to comment a single-line code in Python?

a)

/* comment */

b)

<!-- comment -->

c)

# comment

d)

/* comment */

37.

Tree

a)

data structure similar to a graph, with no loops.

b)

an object in a graph also known as a vertex

c)

a join of relationship between nodes - also know as an arc

d)

the starting node in a rooted tree structure from which all other nodes branch off./

38.

Root

a)

data structure similar to a graph, with no loops.

b)

an object in a graph also known as a vertex

c)

a join of relationship between nodes - also know as an arc

d)

the starting node in a rooted tree structure from which all other nodes branch off./

39.

What is the value of the ROOT node in this Tree?

a)

35

b)

24

c)

42

d)

20

40.
A Kind of tree where every node in a tree can have at most two children.
a)
Binary Tree
b)
Binary Expression Tree
c)
Tree
d)
Binary Search Tree
41.

Binary TREE

a)

data structure similar to a graph, with no loops.

b)

an object in a graph also known as a vertex

c)

a join of relationship between nodes - also know as an arc

d)

a tree where each node can only have 2 child nodes attached to it

42.

In preorder traversal of a binary tree the second step is ____________

a)

traverse the right subtree

b)

traverse the left subtree

c)

traverse right subtree and visit the root

d)

visit the root

43.

How many leaf are there in the tree?

a)

1

b)

3

c)

4

d)

7

44.
In this tree, where would the new value "7" be placed?
a)
On the left "leaf" of "4"
b)
On the right "leaf" of "6"
c)
On the left "leaf" of "15"
d)
Over the top of the current number "5"
45.

Which of these tree traversal methods is used to output the contents of a binary tree in ascending order?

a)

Pre-Order

b)

In-Order

c)

Post-Order

d)

Monastic Orders

46.

What are the 3 depth traversals for a tree data structure?

a)

Pre-, In- and Post-order

b)

Pro-, In- and Past-order

c)

Pre-, Out- and Post-order

d)

Pre-, In- and New-order

47.

When traversing a binary tree, which diagram is post-order?

a)
b)
c)
48.

When traversing a binary tree, which diagram is pre-order?

a)
b)
c)
49.

Given a sequence of number below:

50,60,40,70,45,55,30,80,65,35,25,75,85


When creating a binary search tree, what is the height of the tree?

a)

3

b)

4

c)

5

d)

6

50.

Given a binary search tree, insert 27, 15, 63, 99, 70 and 85 (in this order) into the binary search tree. What is the post-order traversal?

a)

5,15,27,34,47,54,63,70,72,75,83,85,88,94,99,101

b)

72,54,34,5,27,15,47,63,70,83,75,88,85,101,94,99

c)

15,27,5,47,34,70,63,54,75,85,99,94,101,88,83,72

d)

15,27,5,47,34,63,54,70,75,85,99,94,101,88,83,72

e)

none of the above

51.
A Balanced Tree has equal number of items on each subtree.
a)
True
b)
False
52.

Choose the correct statement

a)

A data structure is a specialised format for organising and storing data

b)

A data structure is a specialised format for organising and storing information

c)

A data structure is a format for organising and storing only one data type

d)

A data structure is too complicated to truly understand or use

53.

Algorithm is a __________________ procedure.

a)

shortcut

b)

function

c)

reverse

d)

step by step