Collection of different data type call structure.‘struct’ keyword is used to create a structure.
struct structure_name { data-type1; data-type2; };
struct Point { int x, y; }; void main() { struct Point p1 = {0, 1}; //calling structure p1.x = 20; printf ("x = %d, y = %d", p1.x, p1.y); }
Output
20 1