A structure is a user-defined data type that allows to combine data items of different kinds. Structures are used to represent a record. Suppose you want to keep track of books in a library. You might want to track the following attributes about each book-Title, Author, Subject, and Book ID.
Structures, commonly referred to as structs, serve as a comprehensive unit for consolidating various related variables. Unique to structures, each component, termed a structure member, can embody diverse data types, including int, float, char, and more.