Font size
WorksheetsQuiz on Data Structures
Total questions: 53
Worksheet time: 53mins
What do you call a collection of items stored at contiguous memory locations?
Linked List
Linear List
Array
Data Structure
Which of the following are examples of Data Structures?
Linear List
Linked List
Stacks
Trees
Pseudocodes
A (a) is a linear data structure, in which elements are not stored at contiguous memory locations.
What does LIFO stand for?
Last In First Out
Least In Flow Out
Last In Flow Out
Last In First Object
Why do we need to organize data in a computer? Check all possible answers.
You will easily direct someone to access a file for you.
You will easily update back-ups or switch computers.
You will always know where to find what you need.
You will never waste time where to save anything.
What do you this data structure classification in which the elements are stored/accessed on a non-linear order such as trees and graphs.
trees
linear
non-linear
graphs
How do you call this special function that is used to map a given value with a particular key for faster access of elements?
merge
sorted array
hash
bubble
(a) are used to represent networks. The networks may include paths in a city or telephone network or circuit network.
In linked list, the elements are using (a) to linked the data item to the next address in memory location.
Queue is using the order called FIFO while stack follows the order of LIFO or (a) .
Which data structure is a non-linear data structure?
Stack
Graphs
Linked list
Queue
If the array is already sorted, then the running time for merge sort is: ?
O(1)
O(nlogn)
O(n)
O(n^2)
Example of linear data structure except
array
tree
queue
stack
Which of these data structures is LIFO?
Stack
Queue
Binary Tree
Double linked list
int nums[ ] =
{2, 3, 5, 8, 9, 11};
How would you access the fourth element in nums
nums[8]
nums[3]
nums(4)
nums(3)
A FIFO structure implemented as a ring where the front and rear pointers can wrap around the end of the start of the array.
Linear Queue
Circular Queue
Priority Queue
It use pointer to link nodes.
Variable
Link List
Pointer
Trees
LIFO stands for
List of Outputs
Last in First Out
First in Last Out
None of them
Linked list data structure offers considerable saving in _____________
a) Computational Time
b) Space Utilization
c) Space Utilization and Computational Time
d) Speed Utilization
Which of the following is/are the levels of implementation of data structure
Abstract level
Application level
Implementation level
All of the above
To represent hierarchical relationship between elements, Which data structure is suitable?
Dequeue
Priority
Tree
Graph
Match the following.
a) Completeness i) How long does it take to find a solution
b) Time Complexity ii) How much memory need to perform the search.
c) Space Complexity iii) Is the strategy guaranteed to find the solution when there in one.
a-iii, b-ii, c-i
a-i, b-ii, c-iii
a-iii, b-i, c-ii
a-i, b-iii, c-ii
___________ is neither an algorithm nor a program.
a.Computing
b.Pseudo code
c.Computer science
d.None of the above
Efficiency of an algorithm is measured by
Time and Capacity complexity
Time and Space complexity
Speed and Space complexity
Speed and Capacity complexity
Data in the data structures are processed by operations like insertion, deletion, sorting, merging and
Traversing
Searching
Retrieval
Both A and B
To measure Time complexity of an algorithm Big O notation is used which:
A. describes limiting behaviour of the function
B. characterises a function based on growth of function
C. upper bound on growth rate of the function
D. all of the mentioned
If for an algorithm time complexity is given by O(1) then complexityof it is:
A. constant
B. polynomial
C. exponential
D. none of the mentioned
If for an algorithm time complexity is given by O(n) then complexityof it is:
A. constant
B. linear
C. exponential
D. none of the mentioned
The worst case occurs in linear search algorithm when ______________________
Item is not in the array at all
Item is somewhere in the middle of the array
Item is the last element in the array or item is not there at all
Item is the last element in the array
Recognize the algorithm that does not divide the list.
Merge sort
Binary Search
Linear Search
Quick sort
The data type keyword NOT supported in C Language is:
double
pointer
union
enum
What is the range of floating point number in C ?
1.7 e -38 to 1.7 e +38
3.4 e -38 to 3.4 e +38
1.7 e -308 to 1.7 e +308
3.4 e -308 to 3.4 e +308
Under which data structure category does the Stack fall?
Homogeneous
Built-in
Non linear
Linear
Which of these in NOT a linear data structure?
Tree
Stack
Array
Queue
The data structure which expands and shrinks as per demand is called:
Array
Dynamic
Linked list
Non-linear
The operation to arrange all elements in required order is called:
Search
Insertion
Sorting
Merging
State the meaning of "void" keyword:
No statement
No function
No program
No value
What is the range?
average
greatest-least
the middle #
# happening the most
Which of the following operator can be used to access value at address stored in a pointer variable?
*
&
->
.
What will be the output produced by the following C code?
0
1
-1
Compile error
Assume int is 2 bytes, char is 1 byte and float is 4 bytes. Also, assume that the pointer size is 4 bytes. Predict the output.
1 2 4
1 4 4
4 4 4
None of the above
Predict the output of the following code.
1
2
3
Compile error
What is the output of the following program?
1
2
3
Compile error
What is the output of the following program?
Hi
Hello
HiHello
Compile error
What is the output of the following program?
0
1
2
Compile error
What is the output of the following code snippet?
15
Garbage value
Run-time error
Compile-time error
What is the output of the below code snippet?
Infinite loop
Prints “Hello” once
No output
Compile error
What is the output of following program?
0
1
2
3
Guess the output?
3
-4
4
Compile error
