Stack and Queue Data Structure MCQs

Stack and Queue Data Structure MCQs

Stack and Queue Data Structure MCQs

  1. 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
  2. (a) Queue
    (b) Stack
    (c) Tree
    (d) Linked list

    (a) Queue

  3. A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
  4. (a) Rear = MAX_SIZE - 1
    (b) Front = (rear +1)mod MAX_SIZE
    (c) Front = rear+ 1
    (d) Rear= front

    (a) Rear = MAX_SIZE - 1

  5. In a stack,if a user tries to remove an element from an empty stack it is called _____.
  6. (a) Underflow
    (b) Empty collection
    (c) Overflow
    (d) Garbage Collection

    (a) Underflow

  7. Entries in a stack are "ordered". What is the meaning of this statement?
  8. (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

    (d) There is a Sequential entry that is one by one

  9. Which of the following is not the application of stack?
  10. (a) A parentheses balancing program
    (b) Tracking of local variables at run time
    (c) Compiler Syntax Analyzer
    (d) Data Transfer between two asynchronous process

    (d) Data Transfer between two asynchronous process

  11. What is the value of the postfix expression 6 3 2 4 +-*"
  12. (a) 1
    (b) 40
    (c) 74
    (d) -18

    (d)-18

  13. Which of the following is an application of stack?
  14. (a) finding factorial
    (b) tower of Hanoi
    (c) infix to postfix
    (d) all of the above

    (d) all of the above

  15. What is the postfix expression for the corresponding infix expression?a+b*c+ (d*e)
  16. (a) abc*+de*+
    (b) a+bc+*de*+
    (c) a+bc*de*
    (d) abc*+(de)*+

    (a) abc*+de*+

  17. It is easier for a computer to process a postfix expression than an infix expression.
  18. (a) True
    (b) False

    (a) True

  19. In infix to postfix conversion algorithm, the operators are associated from?
  20. (a) right to left
    (b) left to right
    (c)centre to left
    (d) centre to right

    (b) left to right

  21. Let the following circular queue can accommodate maximum six elements with the following data.What will happen after ADD O operation takes place?
    front = 2 rear = 4 queue :__________ L, M, N,___,_____.
  22. (a) front = 2 rear = 5 queue = _______; L, M, N, O,_____
    (b) front = 3 rear = 5 queue = L, M, N, O,_____
    (c) front = 3 rear = 4 queue = _______; L, M, N, O,_____
    (d) front = 2 rear = 4 queue = L, M, N, O,_____

    (a) front = 2 rear = 5 queue = _______; L, M, N, O,_____

  23. How many stacks are needed to implement a queue. Consider the situation where no other data structure like arrays, linked list is available to you.
  24. (a) 1
    (b) 2
    (c) 3
    (d) 4

    (b) 2

  25. In linked list implementation of a queue, where does a new element be inserted?
  26. (a) At the head of link list
    (b) At the tail of the link list
    (c) At the centre position in the link list
    (d) None

    (b) At the tail of the link list

  27. A circular queue is implemented using an array of size 10. The array index start with 0, front is 6, and rear is 9. The insertion of next element takes place at the array index.*
  28. (a) 0
    (b) 7
    (c) 9
    (d) 10

    (d) 10

  29. A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?
  30. (a) Queue
    (b) Circular queue
    (c) Dequeue
    (d) Priority queue

    (c) Dequeue

  31. A normal queue, if implemented using an array of size MAX_SIZE, gets full when
  32. (a) Rear= MAX_SIZE-1
    (b) Front= (rear+1)mod MAX_SIZE
    (c) Front= rear+1
    (d) Rear= front

    (a) Rear= MAX_SIZE-1

  33. What is the worst case time complexity of a sequence of n queue operations on an initially empty queue?
  34. (a) 0 (n)
    (b) 0 (n + k)
    (c) 0 (nk)
    (d) 0 (n2)

    (a) 0 (n)

  35. a normal queue, if implemented using an array of size max_size, gets full when
  36. (a) Rear = MAX_SIZE – 1
    (b) Front = (rear + 1)mod MAX_SIZE
    (c) Front = rear + 1
    (d) Rear = front

    (a) Rear = MAX_SIZE – 1

  37. which of the following is not the type of queue?
  38. (a) Ordinary Queue
    (b) Single Ended Queue
    (c) Circular Queue
    (d) Priority Queue

    (b) Single Ended Queu

  39. which of the following is not the correct statement for a stack data structure?
  40. (a) Stack data structure can be implemented using linked list
    (b) New node can only be added at the top of the stack
    (c) Stack is the FIFO data structure
    (d) The last node at the bottom of the stack has a NULL link

    (c) Stack is the FIFO data structure

  41. which of the following is not the application of stack?
  42. (a) A parentheses balancing program
    (b) Tracking of local variables at run time
    (c) Compiler Syntax Analyzer
    (d) Data Transfer between two asynchronous process

    (d) Data Transfer between two asynchronous process

  43. Process of inserting an element in stack is called __________.
  44. (a) Create
    (b) Push
    (c) Evaluation
    (d) Pop

    (b) Push

  45. pushing an element into stack already having five elements and stack size of 5, then stack becomes
  46. (a) Overflow
    (b) Crash
    (c) Underflow
    (d) User flow

    (a) Overflow

  47. Entries in a stack are “ordered”. What is the meaning of this statement?
  48. (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

    (d) There is a Sequential entry that is one by one

  49. In a stack if user tries to remove element from the empty stack then it is called as__________.
  50. (a) Underflow
    (b) Empty Collection
    (c) Overflow
    (d) Garbage Collection

    (a) Underflow

  51. which one of the following is an application of stack data structure?
  52. (a) Managing Function Calls
    (b) The Stock span Problem
    (c) Arithmetic Expression Evaluation
    (d) All of the above

    (d) All of the above

  53. circular queue is also known as ______.
  54. (a) Ring Buffer
    (b) Square Buffer
    (c) Rectangle Buffer
    (d) Curve Buffer

    (a) Ring Buffer

  55. insertion and deletion operation in queue is known as
  56. (a) enqueue operation
    (b) pup and push
    (c) insert and Delete
    (d) Add and Remove

    (a) enqueue operation

  57. The complexity of inserting an item into an unsorted list is?
  58. (a) 0(1)
    (b) 0(n)
    (c) 0(logn)
    (d) 0(n2)

    (a) Overflow

  59. In which data structure element is inserted at one end called Rear and deleted at other end called Front?
  60. (a) Stack
    (b) Queue
    (c) List
    (d) Stack and Queue

    b) Queue

  61. Generally Stack can be implemented using ______ and _________.
  62. (a) Array and Binary Tree
    (b) Linked List and Graph
    (c) Array and Linked List
    (d) Array and Queue

    (c) Array and Linked List

  63. when function calls another function then the details of previous function are stored in stack ?
  64. (a) True
    (b) False

Stack and Queue Data Structure MCQs
Related Topic

"Stack and Queue Data Structure MCQs","Stack data structure mcqs","queue data structure mcqs","Data Structure Multiple Choice Questions & Answers (MCQs)","stack data structure and alogrithm mcqs","queue data structue and alogrithm mcqs"

Post a Comment

To be published, comments must be reviewed by the administrator.

أحدث أقدم