User-Defined Data Types (UDDTs)
In C programming, a User-Defined Data Type is a data type created by the programmer to store multiple values of different data types together.
Common UDDTs:
- Structure (struct)
- Union (union)
- typedef
- enum
Structure (struct)
Definition
A structure is a user-defined data type that allows you to combine variables of different data types under a single name.
Why structure?
- To group related data
- Example: student information → roll number, name, marks
Syntax
0 Comments