Skip to study material

DATA STRUCTURES

Unit I · Structure and Union Types

AR25I Year · II SemesterCSE(AIML)25CS12001

Clear answers, algorithms and worked examples for the current syllabus.

12 topics12 two-mark questions12 five-mark questionsSeparate viva questions

24 questions

Open complete unit for printing / PDF

Questions and answers

  1. 01What is a structure?2 marks
  2. 02Explain user-defined structure types, declaration and member access.5 marks
  3. 03How is a structure member read with scanf?2 marks
  4. 04Explain initialisation and input/output of structure members.5 marks
  5. 05What is an array of structures?2 marks
  6. 06Explain arrays of structures with a record-processing example.5 marks
  7. 07What is a nested structure?2 marks
  8. 08Explain nested structures and structures containing arrays or pointers.5 marks
  9. 09How can a function change the caller’s structure?2 marks
  10. 10Explain structures as input and output function parameters.5 marks
  11. 11Can a C function return a structure?2 marks
  12. 12Explain functions that return structure values.5 marks
  13. 13What is a self-referential structure?2 marks
  14. 14Explain self-referential structures and their role in linked lists.5 marks
  15. 15What is a bit-field?2 marks
  16. 16Explain structure bit-fields, uses and limitations.5 marks
  17. 17What is a union?2 marks
  18. 18Explain union types and contrast their storage with structures.5 marks
  19. 19State one storage difference between a structure and a union.2 marks
  20. 20Compare structure and union types with suitable uses.5 marks
  21. 21What does typedef do?2 marks
  22. 22Explain typedef and its use with structures and pointers.5 marks
  23. 23What is an enumeration?2 marks
  24. 24Explain enumeration types and their use as named states.5 marks

The 2- and 5-mark labels are practice allocations. Source examination questions retain their actual printed marks.