C and DS Gate Questions and Answers

Practice Mode
Showing 10 of 29 questions
Q21
The difference between linear array and a record is
  • A An array is suitable for homogeneous data but hte data items in a record may have different data type
  • B In a record, there may not be a natural ordering in opposed to linear array.
  • C A record form a hierarchical structure but a lienear array does not
  • D All of above
Answer: Option D
Q22
Which of the following statement is false?
  • A Arrays are dense lists and static data structure
  • B data elements in linked list need not be stored in adjecent space in memory
  • C pointers store the next data element of a list
  • D linked lists are collection of the nodes that contain information part and next pointer
Answer: Option C
Q23
Binary search algorithm can not be applied to
  • A sorted linked list
  • B sorted binary trees
  • C sorted linear array
  • D pointer array
Answer: Option A
Q24
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
Answer: Option B
Q25
The situation when in a linked list START=NULL is
  • A underflow
  • B overflow
  • C housefull
  • D saturated
Answer: Option A
Q26
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
Answer: Option D
Q27
Which of the following name does not relate to stacks?
  • A FIFO lists
  • B LIFO list
  • C Piles
  • D Push-down lists
Answer: Option A
Q28
The term "push" and "pop" is related to the
  • A array
  • B lists
  • C stacks
  • D all of above
Answer: Option C
Q29
If the finalize() method of an object is re-references an object so that it becomes in-eligible for garbage collection
  • A The compiler will throw an error.
  • B The garbage collector "collects" the object anyway.
  • C The garbage collector does not collect the object in the present sweep. But when the object becomes eligible for garbage collection again, its finalize method will not be called by the garbage collector (i.e., if the garbage collector gets a chance to run
  • D The object can never be garbage collected and hence leads to memory-leak. Each time the garbage collector calls finalize before "collecting" the object the object "resurrects" itself.
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test