The following code seems to work, but I don't understand why.
The line:Looks to me like it is de-referencing 'next' member of NULL, which doesn't make a whole lot of sense. Is that what is going on, or I am misunderstanding what is going on here? If so, is that well defined?Code:zip = &dog->next;
Thank you,
Kyle
Code:#include <stdio.h> struct foo { int value; struct foo * next; }; int main() { struct foo baz; struct foo *dog; struct foo **zip; baz.next = NULL; zip = &baz.next; dog = *zip; zip = &dog->next; return(0); }