That's initialisation, not assignment. The key here is that you have declared these variables outside of a function, so they have static storage duration (this is true even though the static keyword was not used; if you did use it, they would still have static storage duration, but would have internal linkage instead of the external linkage that they have now), and are initialised at startup. If you don't specify any constant for initialisation, they are zero initialised, which for pointers means that they are initialised to be null pointers.Originally Posted by C_me_run
How are you making the linked list?Originally Posted by C_me_run
It doesn't, because there is no next pointer inside of them. They are pointers to struct node objects, but not struct node objects themselves, thus they don't have any members, hence they don't have a next pointer member.Originally Posted by C_me_run