C-Dynamic Memory Allocation and Data Structure Questions and Answers

Practice Mode
Showing 10 of 104 questions
Q61
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
  • A Stack
  • B Queue
  • C Tree
  • D Linked list
Answer: Option B
Q62
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
  • A Priority queue
  • B Circular queue
  • C Restricted queue
  • D Deque
Answer: Option B
Q63
Given the psudeocode if *rear == MAX-1 && front ==0) || (rear +1 == front)) What is true about this ?
  • A Queue is empty
  • B Underflow
  • C Queue is full
  • D None of these
Answer: Option C
Q64
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
  • A The element to be deleted is first element
  • B The element to be deleted is the only element
  • C The element to be deleted is last element
  • D Queue has no element now.
Answer: Option D
Q65
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
  • A 1st position
  • B 0th position
  • C 7th position
  • D 8th position
Answer: Option B
Q66
One diffference between queue and a stack is:
  • A Queues require linked lists, but stacks do not.
  • B Stacks require linked lists, but queues do not
  • C Queues use two ends of the structure; stacks use only one.
  • D Stacks use two ends of the structure, queues use only one.
Answer: Option C
Q67
A queue in which addition and deletion takes place at both end is called
  • A Circular queue
  • B Deque
  • C Priority queue.
  • D None of these
Answer: Option B
Q68
Queue in which deletion takes place at one end only but addition can take place at both the end.
  • A Input-restricted dqueue
  • B Output restricted dqueue
  • C Both a and b
  • D None of these
Answer: Option B
Q69
What is the condition for the Dequeue to be empty ?
  • A front= -1
  • B front=rear=-1
  • C front=rear=MAX-1
  • D None of these
Answer: Option B
Q70
queue in which addiition takes place at one end only but deletion takes place at both the end.
  • A Input-restricted dqueue
  • B Output-restricted dqueue
  • C Both a and b
  • D None of these
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test