1. to avoid creating different variables for each entity and their respective variables for each and every attribute, we can use structures.
  2. Structure is a group of variables of different data types represented by a single name.
  3. Structures are the basic foundation for objects and classes in C
  4. Serialization of data
  5. Passing multiple arguments in and out of functions through a single argument
  6. Data structures such as linked lists, binary trees, and more
struct point {
    int x;
    int y;
}
  • ’ . ’ is the member accessing operator
/* draws a point at 10, 5 */
int x = 10;
int y = 5;
draw(x, y);
  • Using structs, we can pass a point argument:
/* draws a point at 10, 5 */
struct point p;
p.x = 10;
p.y = 5;
draw(p);

Declaring structure variable