Structure data types cont.
Then the declaration 'struct card c1,c2;' allocated storage for the identifiers c1 and c2, which are of type struct card. To assign values to these card, we write: c1.pips = 5; c1.suit = 'd'; c2.pips = 12; c2.suit = 's';
Stucture - array of struct
struct person { char name[30];
char street[30];
int age;
float month_salary;};
struct person employee[10];
To assign values:
strcpy(employee[1].streer,”Hong Kong Island”);
employee[6].month_salary = 500000.00/12.0;