Data Structure Solved MCQs

Multiple Choice Questions 38 Pages
FT

Contributed by

Falguni Talwar
Loading
  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    Unit 1 : Basic Concept and Introduction to Data structure
    1. Which of these best describes an array?
    a) A data structure that shows a hierarchical behaviour
    b) Container of objects of similar types
    c) Arrays are immutable once initialised
    d) Array is not a data structure
    2. How do you initialize an array ?
    a) int arr[3] = (1,2,3);
    b) int arr(3) = {1,2,3};
    c) int arr[3] = {1,2,3};
    d) int arr(3) = (1,2,3);
    3. When does the ArrayIndexOutOfBoundsException occur?
    a) Compile-time
    b) Run-time
    c) Not an error
    d) Not an exception at all
    4. Which of the following concepts make extensive use of arrays?
    a) Binary trees
    b) Scheduling of processes
    c) Caching
    d) Spatial locality
    5. What are the advantages of arrays?
    a) Objects of mixed data types can be stored
    b) Elements in an array cannot be sorted
    c) Index of first element of an array is 1
    d) Easier to store elements of same data type
    6. What are the disadvantages of arrays?
    a) Data structure like queue or stack cannot be implemented
    b) There are chances of wastage of memory space if elements inserted in an array are lesser than the
    allocated size
    c) Index value of an array can be negative
    d) Elements are sequentially accessed

    Page 1

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    7. Assuming int is of 4bytes, what is the size of int arr[15];?
    a) 15
    b) 19
    c) 11
    d) 60
    8. In general, the index of the first element in an array is __________
    a) 0
    b) -1
    c) 2
    d) 1
    9. Elements in an array are accessed _____________
    a) randomly
    b) sequentially
    c) exponentially
    d) logarithmically

    Page 2

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    Unit : Stack and Queue
    10. Process of inserting an element in stack is called ____________
    a) Create
    b) Push
    c) Evaluation
    d) Pop
    11. Process of removing an element from stack is called __________
    a) Create
    b) Push
    c) Evaluation
    d) Pop
    12. 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
    13. Pushing an element into stack already having five elements and stack size of 5, then stack becomes
    a) Overflow
    b) Crash
    c) Underflow
    d) User flow
    14. Entries in a stack are “ordered”. What is the meaning of this statement?
    a) A collection of stacks is sortable
    b) Stack entries may be compared with the ‘<‘ operation
    c) The entries are stored in a linked list
    d) There is a Sequential entry that is one by one
    15. . Which of the following applications may use a stack?
    a) A parentheses balancing program
    b) Tracking of local variables at run time
    c) Compiler Syntax Analyzer
    d) Data Transfer between two asynchronous process
    16. Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
    The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the
    algorithm analyzes: (()(())(())) are:
    a) 1
    b) 2
    c) 3

    Page 3

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    d) 4 or more
    17. Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
    Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right
    parentheses (in some order).
    The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the
    computation?
    a) 1
    b) 2
    c) 3
    d) 4 or more
    18. What is the value of the postfix expression 6 3 2 4 + *?
    a) 1
    b) 40
    c) 74
    d) -18
    19. Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack algorithm to
    convert the expression from infix to postfix notation.
    The maximum number of symbols that will appear on the stack AT ONE TIME during the
    conversion of this expression?
    a) 1
    b) 2
    c) 3
    d) 4
    20. The postfix form of the expression (A+ B)*(C*D- E)*F / G is?
    a) AB+ CD*E FG /**
    b) AB + CD* E F **G /
    c) AB + CD* E *F *G /
    d) AB + CDE * * F *G /
    21. The data structure required to check whether an expression contains balanced parenthesis is?
    a) Stack
    b) Queue
    c) Array
    d) Tree
    22. What data structure would you mostly likely see in a non recursive implementation of a recursive
    algorithm?
    a) Linked List
    b) Stack

    Page 4

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    c) Queue
    d) Tree
    23. The process of accessing data stored in a serial access memory is similar to manipulating data on a
    ________
    a) Heap
    b) Binary Tree
    c) Array
    d) Stack
    24. The postfix form of A*B+C/D is?
    a) *AB/CD+
    b) AB*CD/+
    c) A*BC+/D
    d) ABCD+/*
    25. Which data structure is needed to convert infix notation to postfix notation?
    a) Branch
    b) Tree
    c) Queue
    d) Stack
    26. The prefix form of A-B/ (C * D ^ E) is?
    a) -/*^ACBDE
    b) -ABCD*^DE
    c) -A/B*C^DE
    d) -A/BC*^DE
    27. What is the result of the following operation?
    Top (Push (S, X))
    a) X
    b) X+S
    c) S
    d) XS
    28. The prefix form of an infix expression (p + q) (r * t) is?
    a) + pq *rt
    b) +pqr * t
    c) +pq * rt
    d) + * pqrt

    Page 5

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    29. . Which data structure is used for implementing recursion?
    a) Queue
    b) Stack
    c) Array
    d) List
    30. The result of evaluating the postfix expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is?
    a) 600
    b) 350
    c) 650
    d) 588
    31. Convert the following infix expressions into its equivalent postfix expressions
    (A + B D)/(E F)+G
    a) (A B D + E F / G +)
    b) (A B D + E F / G +)
    c) (A B D + E F/- G +)
    d) (A B D E F + / G +)
    32. Convert the following Infix expression to Postfix form using a stack
    x + y * z + (p * q + r) * s, Follow usual precedence rule and assume that the expression is legal.
    a) xyz*+pq*r+s*+
    b) xyz*+pq*r+s+*
    c) xyz+*pq*r+s*+
    d) xyzp+**qr+s*+
    33. Which of the following statement(s) about stack data structure is/are NOT correct?
    a) Linked List are used for implementing Stacks
    b) Top of the Stack always contain the new node
    c) Stack is the FIFO data structure
    d) Null link is present in the last node at the bottom of the stack
    34. . Consider the following operation performed on a stack of size 5.
    Push(1);
    Pop();
    Push(2);
    Push(3);
    Pop();
    Push(4);
    Pop();
    Pop();
    Push(5);
    After the completion of all operation, the number of elements present in stack are

    Page 6

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    a) 1
    b) 2
    c) 3
    d) 4
    35. Which of the following is not an inherent application of stack?
    a) Reversing a string
    b) Evaluation of postfix expression
    c) Implementation of recursion
    d) Job scheduling
    36. The type of expression in which operator succeeds its operands is?
    a) Infix Expression
    b) Prefix Expression
    c) Postfix Expression
    d) Both Prefix and Postfix Expressions
    37. Assume that the operators +,-, X are left associative and ^ is right associative.
    The order of precedence (from highest to lowest) is ^, X, +, -. The postfix expression for the infix
    expression a + b X c d ^ e ^ f is
    a) abc X+ def ^^
    b) abc X+ de^f^
    c) ab+c Xd e ^f^
    d) -+aXbc^ ^def
    38. If the elements “A”, “B”, “C” and “D” are placed in a stack and are deleted one at a time, what is the
    order of removal?
    a) ABCD
    b) DCBA
    c) DCAB
    d) ABDC
    39. A linear list of elements in which deletion can be done from one end (front) and insertion can take
    place only at the other end (rear) is known as a ?
    a) Queue
    b) Stack
    c) Tree
    d) Linked list
    40. The data structure required for Breadth First Traversal on a graph is?
    a) Stack
    b) Array
    c) Queue

    Page 7

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    d) Tree
    41. A queue follows __________
    a) FIFO (First In First Out) principle
    b) LIFO (Last In First Out) principle
    c) Ordered array
    d) Linear tree
    42. Circular Queue is also known as ________
    a) Ring Buffer
    b) Square Buffer
    c) Rectangle Buffer
    d) Curve Buffer
    43. If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what
    order will they be removed?
    a) ABCD
    b) DCBA
    c) DCAB
    d) ABDC
    44. A data structure in which elements can be inserted or deleted at/from both the ends but not in the
    middle is?
    a) Queue
    b) Circular queue
    c) Dequeue
    d) Priority queue
    45. A normal queue, if implemented using an array of size MAX_SIZE, gets full when
    a) Rear = MAX_SIZE 1
    b) Front = (rear + 1)mod MAX_SIZE
    c) Front = rear + 1
    d) Rear = front
    46. Queues serve major role in ______________
    a) Simulation of recursion
    b) Simulation of arbitrary linked list
    c) Simulation of limited resource allocation
    d) Simulation of heap sort
    47. Which of the following is not the type of queue?
    a) Ordinary queue
    b) Single ended queue

    Page 8

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    c) Circular queue
    d) Priority queue
    Unit : Linked List
    48. A linear collection of data elements where the linear node is given by means of pointer is called?
    a) Linked list
    b) Node list
    c) Primitive list
    d) Unordered list
    49. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a
    head pointer only.
    Given the representation, which of the following operation can be implemented in O(1) time?
    i) Insertion at the front of the linked list
    ii) Insertion at the end of the linked list
    iii) Deletion of the front node of the linked list
    iv) Deletion of the last node of the linked list
    a) I and II
    b) I and III
    c) I, II and III
    d) I, II and IV
    50. In linked list each node contain minimum of two fields. One field is data field to store the data
    second field is?
    a) Pointer to character
    b) Pointer to integer
    c) Pointer to node
    d) Node
    51. What would be the asymptotic time complexity to add a node at the end of singly linked list, if the
    pointer is initially pointing to the head of the list?
    a) O(1)
    b) O(n)
    c) θ(n)
    d) θ(1)
    52. What would be the asymptotic time complexity to insert an element at the front of the linked list
    (head is known)?
    a) O(1)
    b) O(n)
    c) O(n
    2
    )

    Page 9

  • DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE 45
    Subject : Data Structure Class : S.Y. BBA(CA)
    Prof . S. B. Potadar www.dacc.edu.in
    d) O(n
    3
    )
    53. What would be the asymptotic time complexity to find an element in the linked list?
    a) O(1)
    b) O(n)
    c) O(n
    2
    )
    d) O(n
    4
    )
    54. What would be the asymptotic time complexity to insert an element at the second position in the
    linked list?
    a) O(1)
    b) O(n)
    c) O(n
    2
    )
    d) O(n
    3
    )
    55. The concatenation of two list can performed in O(1) time. Which of the following variation of linked
    list can be used?
    a) Singly linked list
    b) Doubly linked list
    c) Circular doubly linked list
    d) Array implementation of list
    56. What kind of linked list is best to answer question like “What is the item at position n?”
    a) Singly linked list
    b) Doubly linked list
    c) Circular linked list
    d) Array implementation of linked list
    57. Linked lists are not suitable to for the implementation of?
    a) Insertion sort
    b) Radix sort
    c) Polynomial manipulation
    d) Binary search
    58. Linked list is considered as an example of ___________ type of memory allocation.
    a) Dynamic
    b) Static
    c) Compile time
    d) Heap
    59. In Linked List implementation, a node carries information regarding ___________
    a) Data
    b) Link

    Page 10

Download this file to view remaining 28 pages

logo StudyDocs
StudyDocs is a platform where students and educators can share educational resources such as notes, lecture slides, study guides, and practice exams.

Contacts

Links

Resources

© 2025 StudyDocs. All Rights Reserved.