previous | start | next

Structure type

Declaring a variable of struct type allocates storage for the struct, but doesn't initialize the struct members.

typedef struct s1 {
  double x;
  int n;
  char c1;
  char c2;
} S1;

S1 rec;

rec.x = 3.5;
rec.n = 0;
rec.c1 = 'a';
rec.c2 = 'b';

   


previous | start | next