Chapter 6

Exercise 6.1

struct {
  int a,b;
};

Exercise 6.2

Without a tag or any variables defined, the structure declaration is of little use. It cannot be referred to later.

Exercise 6.3

struct int_struc{
  int a,b;
}x,y;

Exercise 6.4

struct int_struc z;

Exercise 6.5

p = &z;
p->a = 0;

Exercise 6.6

Explicitly, for example

struct x;

or implicitly,

struct x *p;

when no outer declaration exists.

Exercise 6.7

It is not treated as a pointer, but as a short-hand way of initializing the individual array elements.

Exercise 6.8

Nothing unusual at all, the string is treated as a literal constant of type const char *.

Exercise 6.9

Yes. It is easier!