DATA STRUCTURES
Unit I · Structure and Union Types
Clear answers, algorithms and worked examples for the current syllabus.
Questions and answers
- 01What is a structure?2 marks
- 02Explain user-defined structure types, declaration and member access.5 marks
- 03How is a structure member read with scanf?2 marks
- 04Explain initialisation and input/output of structure members.5 marks
- 05What is an array of structures?2 marks
- 06Explain arrays of structures with a record-processing example.5 marks
- 07What is a nested structure?2 marks
- 08Explain nested structures and structures containing arrays or pointers.5 marks
- 09How can a function change the caller’s structure?2 marks
- 10Explain structures as input and output function parameters.5 marks
- 11Can a C function return a structure?2 marks
- 12Explain functions that return structure values.5 marks
- 13What is a self-referential structure?2 marks
- 14Explain self-referential structures and their role in linked lists.5 marks
- 15What is a bit-field?2 marks
- 16Explain structure bit-fields, uses and limitations.5 marks
- 17What is a union?2 marks
- 18Explain union types and contrast their storage with structures.5 marks
- 19State one storage difference between a structure and a union.2 marks
- 20Compare structure and union types with suitable uses.5 marks
- 21What does typedef do?2 marks
- 22Explain typedef and its use with structures and pointers.5 marks
- 23What is an enumeration?2 marks
- 24Explain enumeration types and their use as named states.5 marks
No matching questions. Change the search or marks filter.
The 2- and 5-mark labels are practice allocations. Source examination questions retain their actual printed marks.