1. ## Questions on Linked Lists

Hello,

The first is this section of code:

struct node
{
int x; node *next;
};

For the *next pointer, is it in charge of pointing to another node? In Linked Lists, a node means another identical structure right?

The second ques is this section of code:

root->next = NULL;

Is it compulsary to initialize the pointer of the first node to NULL each time?

The third question:

while(conductor->next != NULL)
conductor = conductor -> next;

Earlier on, the conductor pointer points to root (the first node). And the *next pointer was already set to NULL earlier. So it seems that the while loop will never run at all. Is this correct?

Besides, what does this entire while loop do? I am still not so sure even after reading the Lesson explanations.

Lastly, what is the whole idea of Linked Lists? Is it a continuous replication of a structure until a NULL is encountered?

That's all......the question is rather long but thanks for your time.

2. For the *next pointer, is it in charge of pointing to another node? In Linked Lists, a node means another identical structure right?

Yeah... it points to another node. And I'm not sure if they're always called nodes, but I think it could be possible (all these books of mine can't be wrong).

Is it compulsary to initialize the pointer of the first node to NULL each time?

Would seem to be. I would initialize the pointer of each newly created node to NULL though so when searching through, I can stop when I hit NULL.

Earlier on, the conductor pointer points to root (the first node). And the *next pointer was already set to NULL earlier. So it seems that the while loop will never run at all. Is this correct?

I would assume that when a new node is added, the root would be updated.

Besides, what does this entire while loop do?

It basically jumps down the list until the next object is NULL.

Lastly, what is the whole idea of Linked Lists? Is it a continuous replication of a structure until a NULL is encountered?