C and DS Gate MCQ Question and Answer
C and DS Gate MCQ Question and Answer
11. The memory address of the first element of an array is called
- floor address
- foundation address
- first address
- base address
12. The memory address of 7th element of an array can be calculated by the formula
- LOC(Array[7]=Base(Array)+w(7-lower bound), where w is the number of words per memory cell for the array
- LOC(Array[7])=Base(Array[7])+(7-lower bound), where w is the number of words per memory cell for the array
- LOC(Array[7])=Base(Array[6])+(7-Upper bound), where w is the number of words per memory cell for the array
- None of above
13. Which of the following data structures are indexed structures?
- linear arrays
- linked lists
- both of above
- none of above
14. Which of the following is not the required condition for binary search algorithm?
- The list must be sorted
- there should be the direct access to the middle element in any sublist
- There must be mechanism to delete and/or insert elements in list
- none of above
15. Which of the following is not a limitation of binary search algorithm?
- must use a sorted array
- requirement of sorted array is expensive when a lot of insertion and deletions are needed
- there must be a mechanism to access middle element directly
- binary search algorithm is not efficient when the data elements are more than 1000.
16. Two dimensional arrays are also called
- tables arrays
- matrix arrays
- both of above
- none of above
17. A variable P is called pointer if
- P contains the address of an element in DATA
- P points to the address of first element in DATA
- P can store only memory addresses
- P contain the DATA and the address of DATA
18. Which of the following data structure can't store the non-homogeneous data elements?
- Arrays
- Records
- Pointers
- None
19. Which of the following data structure store the homogeneous data elements?
- Arrays
- Records
- Pointers
- None
20. Each data item in a record may be a group item composed of sub-items; those items which are indecomposable are called
- elementary items
- atoms
- scalars
- all of above