Computer Data Structure And Algorithm 2(TTA)

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Allexamreview06
A
Allexamreview06
Community Contributor
Quizzes Created: 4 | Total Attempts: 2,100
Questions: 25 | Attempts: 127

SettingsSettingsSettings
Computer Data Structure And Algorithm  2(TTA) - Quiz

INSTRUCTIONS
1. NUMBER OF QUESTIONS 25
2. HAS A TIME LIMIT OF 15 MINUTES
3. HAS A PASS MARKS OF 30%
4. QUESTIONS PER PAGE 1
5. EACH QUESTIONS HAS 1 MARKS
6. NEGATIVE MARKING FOR EACH QUESTIONS 0.25
7. WILL ALLOW TO YOU GO BACK ,SKIP AND CHANGE YOUR ANSWERS
8. WILL ALLOW TO YOU PRINT OUT YOUR RESULT AND CERTIFICATE
9. WILL ALLOW TO YOU PRINT OUT YOURS RESPONSE SHEET WITH CORRECT ANSWER KEY AND EXPLANATION
10. WE WILL PROVIDE YOURS RESULT,CERTIFICATE AND YOUR RESPONSE SHEET TO YOURS EMAIL ID AT END OF ONLINE TEST


.
.
.
.


Questions and Answers
  • 1. 

    A variable P is called pointer if

    • A.

      P contains the address of an element in DATA

    • B.

      P points to the address of first element in DATA

    • C.

      P can store only memory addresses

    • D.

      P contain the DATA and the address of DATA

    Correct Answer
    A. P contains the address of an element in DATA
    Explanation
    A variable P is called a pointer if it contains the address of an element in DATA. This means that P is able to store the memory address of a specific element within the DATA. A pointer does not necessarily point to the address of the first element in DATA, nor does it store the entire DATA and its address. Its main purpose is to hold the address of a specific element within the DATA.

    Rate this question:

  • 2. 

    Which of the following data structure can't store the non-homogeneous data elements?

    • A.

      Arrays

    • B.

      Records

    • C.

      Pointers

    • D.

      None

    Correct Answer
    A. Arrays
    Explanation
    Arrays cannot store non-homogeneous data elements because they require all elements to be of the same data type. In an array, each element occupies a fixed amount of memory space, and the data type determines the size of that space. Therefore, if non-homogeneous data elements were allowed, it would be difficult to allocate the appropriate amount of memory for each element. In contrast, records and pointers can store non-homogeneous data elements because they allow for different data types to be stored within a single structure or variable.

    Rate this question:

  • 3. 

    Which of the following data structure store the homogeneous data elements?

    • A.

      Arrays

    • B.

      Records

    • C.

      Pointers

    • D.

      None

    Correct Answer
    B. Records
    Explanation
    Records are a data structure that store homogeneous data elements. Unlike arrays, which store elements of the same data type, records can store elements of different data types. Records are often used to represent a collection of related data fields, such as a person's name, age, and address. Therefore, records are the correct answer for this question.

    Rate this question:

  • 4. 

    Each data item in a record may be a group item composed of sub-items; those items which are indecomposable are called

    • A.

      Elementary items

    • B.

      atoms

    • C.

      Scalars

    • D.

      All of these

    Correct Answer
    D. All of these
    Explanation
    The correct answer is "all of these" because each data item in a record may indeed be a group item composed of sub-items, which are called elementary items. Additionally, indecomposable items are also referred to as atoms, and scalars are another term used to describe these items. Therefore, all three options are correct and applicable in this context.

    Rate this question:

  • 5. 

    Binary search algorithm can not be applied to

    • A.

      Sorted linked list

    • B.

      Sorted binary trees

    • C.

      sorted linear array

    • D.

      pointer array

    Correct Answer
    A. Sorted linked list
    Explanation
    Binary search algorithm cannot be applied to a sorted linked list because binary search requires random access to elements, which is not possible in a linked list. Binary search relies on dividing the search space in half at each step, but in a linked list, accessing elements in the middle of the list is not efficient. In contrast, binary search can be applied to sorted binary trees, sorted linear arrays, and pointer arrays because these data structures allow for efficient random access to elements.

    Rate this question:

  • 6. 

    When new data are to be inserted into a data structure, but there is no available space; this situation is usually called

    • A.

      underflow

    • B.

      overflow

    • C.

      Housefull

    • D.

      saturated

    Correct Answer
    B. overflow
    Explanation
    When new data are to be inserted into a data structure, but there is no available space, this situation is usually called "overflow." Overflow occurs when the data structure reaches its maximum capacity and cannot accommodate any more data. This can happen in various data structures such as arrays or queues. When an overflow occurs, it indicates that the data structure is full and cannot accept any additional data until some space is freed up.

    Rate this question:

  • 7. 

    The situation when in a linked list START=NULL is

    • A.

      underflow

    • B.

      overflow

    • C.

      housefull

    • D.

      saturated

    Correct Answer
    A. underflow
    Explanation
    The situation when in a linked list START=NULL is referred to as underflow. This means that the linked list is empty and there are no elements present in it. In a linked list, the START pointer points to the first node of the list. When START=NULL, it indicates that there are no nodes in the list, resulting in underflow.

    Rate this question:

  • 8. 

    Which of the following is two way list?

    • A.

      grounded header list

    • B.

      circular header list

    • C.

      linked list with header and trailer nodes

    • D.

      None of above

    Correct Answer
    D. None of above
    Explanation
    None of the options provided is a two way list. A two way list, also known as a doubly linked list, is a type of linked list where each node contains references to both the previous and next nodes in the list. However, none of the given options mention this characteristic.

    Rate this question:

  • 9. 

    Which of the following name does not relate to stacks?

    • A.

      FIFO lists

    • B.

      LIFO list

    • C.

      Piles

    • D.

      Push-down lists

    Correct Answer
    A. FIFO lists
    Explanation
    The name "FIFO lists" does not relate to stacks because stacks follow the LIFO (Last-In, First-Out) principle, while FIFO (First-In, First-Out) is the principle followed by queues. Stacks are a data structure where the last element added is the first one to be removed, while queues are a data structure where the first element added is the first one to be removed. Therefore, "FIFO lists" is not a name that relates to stacks.

    Rate this question:

  • 10. 

    The term "push" and "pop" is related to the

    • A.

      Arrays

    • B.

      lists

    • C.

      stacks

    • D.

      All of these

    Correct Answer
    A. Arrays
    Explanation
    The terms "push" and "pop" are commonly used in the context of stacks. In a stack, elements are added or removed from one end only. The "push" operation adds an element to the top of the stack, while the "pop" operation removes the top element from the stack. Arrays, lists, and stacks are all data structures, but the specific operations of "push" and "pop" are typically associated with stacks.

    Rate this question:

  • 11. 

    A data structure where elements can be added or removed at either end but not in the middle

    • A.

      Linked lists

    • B.

      Stacks

    • C.

      Queues

    • D.

      Deque

    Correct Answer
    D. Deque
    Explanation
    A deque, or double-ended queue, is a data structure that allows elements to be added or removed at both ends. This means that elements can be added or removed at either end, but not in the middle. Linked lists, stacks, and queues also allow elements to be added or removed, but they do not have the capability to do so at both ends. Therefore, the correct answer is deque.

    Rate this question:

  • 12. 

    When inorder traversing a tree resulted E A C K F H D B G; the preorder traversal would return

    • A.

      FAEKCDBHG

    • B.

      FAEKCDHGB

    • C.

      EAFKHDCBG

    • D.

      FEAKDCHBG

    Correct Answer
    B. FAEKCDHGB
    Explanation
    The inorder traversal of a binary tree visits the left subtree, then the root, and finally the right subtree. In this case, the inorder traversal resulted in E A C K F H D B G. The preorder traversal visits the root first, then the left subtree, and finally the right subtree. Therefore, the correct preorder traversal would be FAEKCDHGB.

    Rate this question:

  • 13. 

    Which data structure allows deleting data elements from front and inserting at rear?

    • A.

      Stacks

    • B.

      Queues

    • C.

      Deques

    • D.

      Binary search tree

    Correct Answer
    B. Queues
    Explanation
    Queues are a type of data structure that allows deleting data elements from the front and inserting new elements at the rear. In a queue, the first element that is inserted is the first one to be removed, following the First-In-First-Out (FIFO) principle. This makes queues suitable for scenarios where elements need to be processed in the order they arrive, such as handling requests or tasks in a computer system. Stacks, on the other hand, follow the Last-In-First-Out (LIFO) principle, where the last element inserted is the first one to be removed. Deques and binary search trees do not have the specific functionality of deleting from the front and inserting at the rear.

    Rate this question:

  • 14. 

    Identify the data structure which allows deletions at both ends of the list but insertion at only one end.

    • A.

      Input-restricted deque

    • B.

      Output-restricted deque

    • C.

      Priority queues

    • D.

      None of these

    Correct Answer
    A. Input-restricted deque
    Explanation
    An input-restricted deque is a data structure that allows deletions at both ends of the list but only allows insertion at one end. This means that elements can be removed from either the front or the back of the list, but new elements can only be added to one end of the list, typically the front. This restriction on insertion allows for efficient removal operations while maintaining a specific order of elements in the list.

    Rate this question:

  • 15. 

    Which of the following data structure is non-linear type?

    • A.

      Strings

    • B.

      Lists

    • C.

      Stacks

    • D.

      None of these

    Correct Answer
    D. None of these
    Explanation
    All the options given in the question - Strings, Lists, and Stacks - are linear data structures because they organize data in a sequential manner. However, the correct answer is "None of these" because all the options mentioned are linear data structures, and the question asks for a non-linear data structure. Non-linear data structures, such as trees and graphs, do not organize data in a sequential manner and allow for more complex relationships between data elements.

    Rate this question:

  • 16. 

    Which of the following data structure is linear type?

    • A.

      Strings

    • B.

      Lists

    • C.

      Stacks

    • D.

      None of these

    Correct Answer
    D. None of these
    Explanation
    None of the given options (Strings, Lists, Stacks) are linear data structures. Strings are a sequence of characters and not a data structure. Lists and Stacks are both examples of linear data structures, but they are not the only types. Other linear data structures include arrays, queues, and linked lists. Therefore, the correct answer is "None of these" as there are other linear data structures besides the ones mentioned in the options.

    Rate this question:

  • 17. 

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

    • A.

      Deque

    • B.

      Priority

    • C.

      Priority

    • D.

      All of these

    Correct Answer
    C. Priority
    Explanation
    A priority queue is suitable for representing a hierarchical relationship between elements. In a priority queue, each element is assigned a priority value, and the elements are organized in such a way that the element with the highest priority value is always at the front of the queue. This allows for efficient retrieval of the highest priority element, making it suitable for representing a hierarchical relationship where certain elements have higher priority than others. A deque (double-ended queue) does not inherently have a notion of priority, and therefore may not be suitable for representing a hierarchical relationship.

    Rate this question:

  • 18. 

    A binary tree whose every node has either zero or two children is called

    • A.

      Complete binary tree

    • B.

      Binary Search tree

    • C.

      Extended binary tree

    • D.

      None of these

    Correct Answer
    C. Extended binary tree
    Explanation
    An extended binary tree is a binary tree in which every node has either zero or two children. This means that there are no nodes with only one child in an extended binary tree. Therefore, the given answer is correct.

    Rate this question:

  • 19. 

    Which of the following sorting algorithm is of divide-and-conquer type?

    • A.

      Bubble sort

    • B.

      Insertinon sort

    • C.

      Quick sort

    • D.

      All of above

    Correct Answer
    C. Quick sort
    Explanation
    Quick sort is a sorting algorithm that follows the divide-and-conquer approach. It works by selecting a pivot element and partitioning the array into two sub-arrays, one with elements smaller than the pivot and the other with elements larger than the pivot. This process is recursively applied to the sub-arrays until the entire array is sorted. Therefore, Quick sort is the correct answer as it exemplifies the divide-and-conquer type of sorting algorithm.

    Rate this question:

  • 20. 

    An algorithm that calls itself directly or indirectly is known as

    • A.

      Sub algorithm

    • B.

      Recursion

    • C.

      Polish notation

    • D.

      Traversal alogorithm

    Correct Answer
    B. Recursion
    Explanation
    Recursion is the correct answer because an algorithm that calls itself, either directly or indirectly, is known as a recursive algorithm. In recursion, a problem is divided into smaller subproblems, and the solution to each subproblem is obtained by solving smaller instances of the same problem. This process continues until a base case is reached, which allows the algorithm to terminate. Recursion is commonly used in programming to solve problems that can be broken down into smaller, similar subproblems.

    Rate this question:

  • 21. 

    In a binary tree, certain null entries are replaced by special pointers which point to nodes higher in the tree for efficiency. These special pointers are called

    • A.

      Leaf

    • B.

      Branch

    • C.

      Path

    • D.

      Thread

    Correct Answer
    D. Thread
    Explanation
    In a binary tree, certain null entries are replaced by special pointers called "thread" which point to nodes higher in the tree for efficiency. This allows for faster traversal of the tree as it eliminates the need to backtrack or navigate through unnecessary null entries. By using threads, the tree structure becomes more compact and efficient in terms of memory usage and traversal operations.

    Rate this question:

  • 22. 

    The in order traversal of tree will yield a sorted listing of elements of tree in

    • A.

      Binary trees

    • B.

      Binary search trees

    • C.

      Heaps

    • D.

      None of these

    Correct Answer
    B. Binary search trees
    Explanation
    In a binary search tree, the in-order traversal will yield a sorted listing of elements. This is because the in-order traversal visits the left subtree first, then the root, and finally the right subtree. Since the elements in a binary search tree are arranged in a specific order where all elements in the left subtree are smaller than the root, and all elements in the right subtree are greater than the root, the in-order traversal will produce a sorted listing of the elements. Therefore, the correct answer is binary search trees.

    Rate this question:

  • 23. 

    A connected graph T without any cycles is called

    • A.

      A tree graph

    • B.

      Free tree

    • C.

      A tree

    • D.

      All of these

    Correct Answer
    D. All of these
    Explanation
    A connected graph T without any cycles is called a tree graph because it resembles a tree structure, with a single root node and branches extending outwards. It is also referred to as a free tree because it is free from any loops or cycles. Therefore, all of the given options - tree graph, free tree, and a tree - are correct descriptions for this type of graph.

    Rate this question:

  • 24. 

    In a graph if e=(u, v) means

    • A.

      U is adjacent to v but v is not adjacent to u

    • B.

      E begins at u and ends at v

    • C.

      U is processor and v is successor

    • D.

      Both e begins at u and ends at v and u is processor and v is successor

    Correct Answer
    D. Both e begins at u and ends at v and u is processor and v is successor
    Explanation
    The correct answer is "both e begins at u and ends at v and u is processor and v is successor". This answer combines both conditions mentioned in the question. It states that e begins at u and ends at v, indicating the direction of the edge. Additionally, it states that u is the processor and v is the successor, implying the relationship between the two vertices in terms of their roles or positions in a system or network.

    Rate this question:

  • 25. 

    If every node u in G is adjacent to every other node v in G, A graph is said to be

    • A.

      Isolated

    • B.

      Complete

    • C.

      Finite

    • D.

      Strongly connected

    Correct Answer
    B. Complete
    Explanation
    A graph is said to be complete if every node in the graph is adjacent to every other node in the graph. This means that there is an edge connecting every pair of distinct nodes in the graph. In other words, there are no missing edges in a complete graph. Therefore, the given answer "complete" accurately describes the property of a graph where every node is adjacent to every other node.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 07, 2016
    Quiz Created by
    Allexamreview06
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.