Defining and Using Structures
Learn how to group related variables into a structure and use struct in real-world applications.
1
Defining and Using Structures
Structures (struct) allow us to group related variables under a single name.
In this lesson, you will learn:
- How to define and use structures.
- How to access structure members.
- How to pass structures to functions.

2
What is a Structure?
A structure is a user-defined data type that groups different variables.
Example structure definition:
struct Person {
char name[50];
int age;
float height;
};
Here, a Person structure stores name, age, and height.
All lessons in this course
- Defining and Using Structures
- Unions and Memory Efficiency
- Enumerations (enum)