Professional Documents
Culture Documents
C Programming Language - Structuresunions
C Programming Language - Structuresunions
Computer Programming
Structures
Structure definition
typedef struct { char name[20]; double diameter; int moons; double orbit_time, rotation_time; } planet_t; planet_t my_planet;
Structures
How to define a structure? How to declare a variable? How to manipulate individual components? How to manipulate whole structures?
Assignment
Assigning Values
status = scan_planet(¤t_planet);
An Array of Structures