1.
Data is nothing but a ______________________.
Correct Answer
C. Set of values.
Explanation
Data refers to a set of values, facts, or information that is collected, organized, and stored for analysis or reference. It is not just a collection of nodes or information, but rather a set of values that can be processed and interpreted to derive meaningful insights or make informed decisions.
2.
Overflow condition in stack is called _______________________.
Correct Answer
B. Stack implementation Error
Explanation
Stack implementation error refers to a situation where the stack data structure is not implemented correctly, leading to an overflow condition. When the stack is full and an attempt is made to push another element onto it, an overflow error occurs. This error indicates that the stack implementation does not have proper mechanisms to handle the overflow condition, such as resizing the stack or throwing an exception.
3.
Stack works on the principle of _____________________.
Correct Answer
D. LIFO
Explanation
The correct answer is LIFO, which stands for "Last In, First Out". This means that the last item added to the stack is the first one to be removed. It follows a sequential order where new elements are added on top and removed from the top as well. This principle is commonly used in programming and data structures, where the most recently added item is often the most relevant or needs to be accessed first.
4.
Under which condition circular queue is Full?
Correct Answer
B. Front=(rear+1)%maxsize
Explanation
The given condition "front=(rear+1)%maxsize" indicates that the front pointer is equal to the next position of the rear pointer in the circular queue. This condition implies that the queue is full because the front pointer has caught up with the rear pointer, meaning that there are no empty spaces left in the queue to insert new elements.
5.
Which is not an application of stack?
Correct Answer
C. Real operating system
Explanation
The application of a stack includes the reversal of a string, the evaluation of arithmetic operations, and recursion. However, a real operating system is not an application of a stack. A stack is a data structure that follows the Last-In-First-Out (LIFO) principle, used for managing function calls, expression evaluation, and other related tasks. A real operating system involves various components and functionalities, but it does not directly relate to the concept of a stack.
6.
A leaf node have ____________ degrees.
Correct Answer
C. 0
Explanation
A leaf node is a node in a tree data structure that does not have any child nodes. The degree of a node in a tree is defined as the number of its children. Since a leaf node does not have any children, its degree is 0.
7.
A B-tree is called _______________.
Correct Answer
D. Multi way search tree with Height balance
Explanation
A B-tree is called a multi-way search tree with height balance because it is a tree data structure that allows for efficient search, insertion, and deletion operations. It is designed to maintain a balance between the height of the tree and the number of keys in each node. This balance ensures that the tree remains efficient even when dealing with large amounts of data. Additionally, a B-tree is a multi-way search tree, meaning that each node can have multiple child nodes, allowing for efficient traversal and search operations.
8.
Time complexity of linear search is __________________.
Correct Answer
A. 0(n)
Explanation
The time complexity of linear search is O(n) because in the worst-case scenario, where the target element is at the end of the list or is not present at all, the algorithm would have to iterate through each element of the list to determine this. This means that the time taken to perform the search grows linearly with the size of the list.
9.
Highest precedence is
Correct Answer
D. ^
Explanation
The symbol "^" represents the exponentiation operation, which has the highest precedence among the given symbols. This means that when evaluating an expression, any calculations involving exponentiation should be performed first before any other operations such as multiplication "*", subtraction "-", or addition "+".
10.
Binary search tree is also called two way search tree.
Correct Answer
A. True
Explanation
A binary search tree is a data structure where each node has at most two children, a left child and a right child. It is called a "two way search tree" because it allows for efficient searching in both directions. The left child represents values smaller than the parent node, while the right child represents values greater than the parent node. This structure allows for faster searching, insertion, and deletion operations compared to other data structures. Therefore, the statement "Binary search tree is also called two way search tree" is true.
11.
The value of structure is resizing during run time by using _______________.
Correct Answer
D. Realloc
Explanation
The correct answer is realloc. The realloc function is used to resize the memory allocated for a structure during runtime. It allows for dynamic memory allocation, where the size of the structure can be adjusted as needed. By using realloc, the memory can be resized to accommodate additional or reduced data, ensuring efficient memory management.
12.
How many types of queues are available?
Correct Answer
D. 4
Explanation
There are four types of queues available. This suggests that there are multiple variations or implementations of queues that can be used in different scenarios or applications.
13.
Array is Linear data structure.
Correct Answer
A. True
Explanation
The given statement is true because an array is indeed a linear data structure. It is a collection of elements of the same data type that are stored in contiguous memory locations. The elements in an array are accessed using their index, which represents their position in the array. This linear arrangement allows for efficient access and manipulation of the array elements. Therefore, the correct answer is true.
14.
Disadvantage of linear queue is overcome by using ___________.
Correct Answer
D. Circular queue
Explanation
A circular queue overcomes the disadvantage of a linear queue by allowing the elements to be inserted and removed from both ends. In a linear queue, once the last position is reached, new elements cannot be inserted even if there are empty spaces in the front. However, in a circular queue, when the last position is reached, the next element can be inserted at the beginning of the queue, utilizing the empty spaces efficiently. This ensures that the queue can continue to grow and accommodate more elements without any wastage of space.
15.
Leaf node is also called internal node.
Correct Answer
B. False
Explanation
The given statement is false. A leaf node and an internal node are two different concepts in a tree structure. A leaf node is a node that does not have any children, meaning it is at the end of a branch. On the other hand, an internal node is a node that has at least one child. Therefore, a leaf node cannot be called an internal node.
16.
Which is not a predefined string function?
Correct Answer
B. Strcnt
Explanation
Among the given options, strcnt is not a predefined string function. Commonly used functions like strlen calculate string length, strcat concatenates strings, and strcmp compares strings. However, strcnt is not standard in common string libraries and is not recognized as a predefined function for string manipulation.
17.
Concept of array employs wastage of memory.
Correct Answer
A. True
Explanation
The concept of array employs wastage of memory because arrays allocate a fixed amount of memory for a specific number of elements, even if those elements are not all used. This can result in unused memory space, leading to wastage.
18.
Which is not a primitive data structure?
Correct Answer
A. Stack
Explanation
The options provided in the question are Stack, int, char, and float. Among these options, Stack is not a primitive data structure. A primitive data structure refers to the basic data types that are built-in in programming languages, such as integers (int), characters (char), and floating-point numbers (float). Stack, on the other hand, is an abstract data type that can be implemented using primitive data types. Therefore, the correct answer is Stack.
19.
How many types of sorting is prevalent in data structure?
Correct Answer
D. 2
Explanation
There are two main types of sorting in data structures: internal sorting and external sorting. Internal sorting refers to sorting data that can fit entirely in memory, such as arrays or linked lists. External sorting, on the other hand, is used when the data is too large to fit in memory and needs to be sorted using external storage devices like disks. Therefore, the correct answer is 2.
20.
AVL stands for
Correct Answer
B. Height balanced tree
Explanation
AVL stands for "Height balanced tree". This data structure is a self-balancing binary search tree where the heights of the left and right subtrees of any node differ by at most one. The balancing factor is maintained during insertion and deletion operations, ensuring that the tree remains balanced and the search, insertion, and deletion operations have a time complexity of O(log n).