(4 )
, . () . . , , () .
:
struct __ {
_
}; // (;) !
:
struct film{
char name[20];
char rej[20];
char counry[20];
unsigned int price;
};
struct ( ); film ( ); , film.
__ , ;
_ , .
:
struct film x, y, z;
film x, y, z;
:
struct film *pointer;
film *pointer;
:
struct { double x,y; } s1, s2, sm[9]; struct { int year; char moth, day; } date1, date2;s1, s2 , . sm . date1, date2 year, moth, day.
typedef, .
typedef struct { _ }
__
:
typedef struct{
float x;
float y;
float z;
float r;
} sphere;
sphere a, b;
. .
struct node { int data; struct node * next; }st1_node;node , , .. next. , .. node , node, , , .
, , film:
x.name=;
x.rej=-;
x.counry=-;
|
|
, . struct ( typedef), :
struct film a[100];
, : struct film *ptr;
:
struct{
/* */
}*ptr1, ptr2;