C and DS Gate MCQ Question and Answer
C and DS Gate MCQ Question and Answer
21. The difference between linear array and a record is
- An array is suitable for homogeneous data but hte data items in a record may have different data type
- In a record, there may not be a natural ordering in opposed to linear array.
- A record form a hierarchical structure but a lienear array does not
- All of above
22. Which of the following statement is false?
- Arrays are dense lists and static data structure
- data elements in linked list need not be stored in adjecent space in memory
- pointers store the next data element of a list
- linked lists are collection of the nodes that contain information part and next pointer
23. Binary search algorithm can not be applied to
- sorted linked list
- sorted binary trees
- sorted linear array
- pointer array
24. When new data are to be inserted into a data structure, but there is no available space; this situation is usually called
- underflow
- overflow
- housefull
- saturated
25. The situation when in a linked list START=NULL is
- underflow
- overflow
- housefull
- saturated
26. Which of the following is two way list?
- grounded header list
- circular header list
- linked list with header and trailer nodes
- none of above
27. Which of the following name does not relate to stacks?
- FIFO lists
- LIFO list
- Piles
- Push-down lists
29. If the finalize() method of an object is re-references an object so that it becomes in-eligible for garbage collection
- The compiler will throw an error.
- The garbage collector "collects" the object anyway.
- 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
- 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.