C structure is a collection of different types of data that is grouped together. It is used to represent records.Structkeyword is used to create a structure. Each element of a structure is called a member.



Note: The given above example in which id, name, class, mob are the members of the structure, struct is a keyword and student is structure tag.

Example 2:


Array of structure:



C –structure using Pointer

Dot(.) operator is used to access the data using normal structure variable and arrow( ->) is used to access the data using a pointer variable.

We can access the C structure in two ways.

  1. Using a normal variable
  2. Using pointer variable

Pin It on Pinterest

Share This