What are structures in C?
a) A user-defined data type that groups different data types
b) A function that performs arithmetic operations
c) A pointer to a function
d) A control flow statement
Answer:
a) A user-defined data type that groups different data types
Explanation:
Structures in C are user-defined data types that allow the grouping of variables of different data types under a single name. Each variable within a structure is called a member, and members can be of different data types. Structures are used to represent complex data types that cannot be handled by the built-in types alone, such as representing a record or an object with multiple attributes.
Understanding structures is essential for organizing complex data in a program and for working with more advanced data structures such as linked lists, trees, and graphs.