C-Dynamic Memory Allocation and Data Structure Questions and Answers

Take Exam

Data Structure and Algorithms questions with answers are crucial for technical interviews and competitive exams like GATE, Infosys, and TCS. This topic tests understanding of arrays, linked lists, stacks, queues, trees, and sorting algorithms. Programming interview questions with answers in this section focus on time complexity, optimization, and problem-solving efficiency. Practicing DSA MCQs strengthens core programming logic, helping candidates excel in both written tests and coding interviews.

Detailed questions on dynamic memory use. For further practice, try database data models and data structures algorithms

C-Dynamic Memory Allocation and Data Structure

Showing 10 of 104 questions

61. Suppose you have given more then one file to be printed one after another, which of the data structure works in the back end of printer file priority printing

  • Stack
  • Queue
  • Tree
  • Linked list
Show Answer Report

62. In array implementation of queue there is a posibility that the queue is reported as full even through in actuality there may be empty slots" To overcome this limitation we use

  • Priority queue
  • Circular queue
  • Restricted queue
  • Deque
Show Answer Report

63. Given the psudeocode if *rear == MAX-1 && front ==0) || (rear +1 == front)) What is true about this ?

  • Queue is empty
  • Underflow
  • Queue is full
  • None of these
Show Answer Report

64. In the process of deleting element from the circular queue of 5 elements in array "The value of front is equal to rear", what is true for this statement

  • The element to be deleted is first element
  • The element to be deleted is the only element
  • The element to be deleted is last element
  • Queue has no element now.
Show Answer Report

65. Let us consider a circular queue implemented as array holding 8 elemtns, if front is equal to 6, and rear is 7, then the new element will be placed at

  • 1st position
  • 0th position
  • 7th position
  • 8th position
Show Answer Report

66. One diffference between queue and a stack is:

  • Queues require linked lists, but stacks do not.
  • Stacks require linked lists, but queues do not
  • Queues use two ends of the structure; stacks use only one.
  • Stacks use two ends of the structure, queues use only one.
Show Answer Report

67. A queue in which addition and deletion takes place at both end is called

  • Circular queue
  • Deque
  • Priority queue.
  • None of these
Show Answer Report

68. Queue in which deletion takes place at one end only but addition can take place at both the end.

  • Input-restricted dqueue
  • Output restricted dqueue
  • Both a and b
  • None of these
Show Answer Report

69. What is the condition for the Dequeue to be empty ?

  • front= -1
  • front=rear=-1
  • front=rear=MAX-1
  • None of these
Show Answer Report

70. queue in which addiition takes place at one end only but deletion takes place at both the end.

  • Input-restricted dqueue
  • Output-restricted dqueue
  • Both a and b
  • None of these
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test