C and DS Gate Questions and Answers

Practice Mode
Showing 10 of 29 questions
Q11
The memory address of the first element of an array is called
  • A floor address
  • B foundation address
  • C first address
  • D base address
Answer: Option D
Q12
The memory address of 7th element of an array can be calculated by the formula
  • A LOC(Array[7]=Base(Array)+w(7-lower bound), where w is the number of words per memory cell for the array
  • B LOC(Array[7])=Base(Array[7])+(7-lower bound), where w is the number of words per memory cell for the array
  • C LOC(Array[7])=Base(Array[6])+(7-Upper bound), where w is the number of words per memory cell for the array
  • D None of above
Answer: Option A
Q13
Which of the following data structures are indexed structures?
  • A linear arrays
  • B linked lists
  • C both of above
  • D none of above
Answer: Option A
Q14
Which of the following is not the required condition for binary search algorithm?
  • A The list must be sorted
  • B there should be the direct access to the middle element in any sublist
  • C There must be mechanism to delete and/or insert elements in list
  • D none of above
Answer: Option C
Q15
Which of the following is not a limitation of binary search algorithm?
  • A must use a sorted array
  • B requirement of sorted array is expensive when a lot of insertion and deletions are needed
  • C there must be a mechanism to access middle element directly
  • D binary search algorithm is not efficient when the data elements are more than 1000.
Answer: Option D
Q16
Two dimensional arrays are also called
  • A tables arrays
  • B matrix arrays
  • C both of above
  • D none of above
Answer: Option C
Q17
A variable P is called pointer if
  • A P contains the address of an element in DATA
  • B P points to the address of first element in DATA
  • C P can store only memory addresses
  • D P contain the DATA and the address of DATA
Answer: Option A
Q18
Which of the following data structure can't store the non-homogeneous data elements?
  • A Arrays
  • B Records
  • C Pointers
  • D None
Answer: Option A
Q19
Which of the following data structure store the homogeneous data elements?
  • A Arrays
  • B Records
  • C Pointers
  • D None
Answer: Option B
Q20
Each data item in a record may be a group item composed of sub-items; those items which are indecomposable are called
  • A elementary items
  • B atoms
  • C scalars
  • D all of above
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test