A structure is a user-defined data type that allows grouping of different data types under a single name.
Store related data together
Represent real-world entities
Overcome limitations of arrays
Use dot (.) operator
Passed by value or reference
Access members using -> operator:
Structure inside another structure.
Organizes complex data
Improves readability
Supports data abstraction
Structures store heterogeneous data
Members accessed using dot or arrow operator
Can be used with arrays, pointers, and functions
Take quizzes related to this topic and see where you stand!
Start Quiz Now