C and DS Gate Questions and Answers

Take Exam

C and Data Structures (DS) form the backbone of computer science, and mastering them is essential for anyone preparing for GATE, TCS, Wipro, or Infosys technical interviews. This collection of C and DS Gate technical questions with answers focuses on core programming concepts such as arrays, pointers, stacks, queues, and linked lists. Practicing these programming questions and answers enhances your ability to design efficient algorithms and optimize code performance. Each question includes detailed explanations and logic breakdowns to help you understand the underlying principles. These problems reflect the actual patterns seen in competitive exams and company placement tests, making this section an invaluable practice resource.

C and DS Gate

Showing 10 of 29 questions

11. The memory address of the first element of an array is called

  • floor address
  • foundation address
  • first address
  • base address
Show Answer Report

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
Show Answer Report

13. Which of the following data structures are indexed structures?

  • linear arrays
  • linked lists
  • both of above
  • none of above
Show Answer Report

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
Show Answer Report

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.
Show Answer Report

16. Two dimensional arrays are also called

  • tables arrays
  • matrix arrays
  • both of above
  • none of above
Show Answer Report

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
Show Answer Report

18. Which of the following data structure can't store the non-homogeneous data elements?

  • Arrays
  • Records
  • Pointers
  • None
Show Answer Report

19. Which of the following data structure store the homogeneous data elements?

  • Arrays
  • Records
  • Pointers
  • None
Show Answer Report

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
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test