Skip to main content

Posts

Showing posts with the label define structure

Structure in C programming

A structure is a collection of variables usually of different types that can be used as a single item to handle data more efficiently. An array can be used only to represent a group of data items that belong to the same type. But, if we want to represent a collection of data items of different types using a single name, array can not be used. At that situation, structure is used.             Defining a Structure: Syntax:      struct   structure_name                 {                   type1 member_variable1;                  type2 member_variable2;                  . ...