I'm curious as to why when say I traverse a linked list iteratively I must do while (list != NULL)
instead of while (!list)
. I thought NULL equated to zero or false.
From comments: My program seems to always crash when I attempt a while (!list)
but never the former. Each node contains a void pointer to a piece of data and a pointer to the next node.