(G) would be legal.

What you are doing is dereferenceing a pointer to a structure, and assigning that contained value to the left hand variable.

Consider the following:

struct mystruct x,y,*z;

z = &y; /* ok, z == y now */

x = y; /* perfectly valid */

Thus:

x = *z; /* also perfectly valid */

Recall that by dereferencing a pointer, you are saying "give me the value stored at this location".

(n) is not legal.

You cannot just initialize a structure instance all in one shot like that. Consider the following:

struct mystruct { int x; char y[1024]; float z; };

Given an instance of 'mystruct', called 'abc', you cannot just:

abc = 1;

Which is what you would in effect be doing by assigning it NULL.

However, you can do:

int x = NULL;

That is legal.


Quzah.