hi
i just have one question regarding linked lists.
In the cprogramming.com tutorial about simple linked lists, they show this while loop to traverse all the nodes of the linked list ( i put the printf):
my question is: Why the while condition:Code:while (conductor->next != NULL){ printf("Valor: %d\n", conductor->value); conductor = conductor->next; }
conductor->next != NULL, will work, and the conductor != NULL won't. I tried the last condition and all the data in the nodes were printed, but i got a Segmentation Fault error at the last.
Thanks in advance..