0
Can't loop through Linked list in C
Have created a linked list for a number (int number;) and pointer for another node (struct node *next) and assigned first node number to 1 & second nide number to 2 . Obviously did manually. And if loop through it print values of int number in each node (aka those 2 node) I get the first node number 2 times??? Using both while and for loop....
3 odpowiedzi
+ 5
Ok good job! just a bit of note, you probably wanna make a function to add node(s) instead of repeating the commands to do it in main(). Modularity helps in debugging and prevent main() to overgrow : )
+ 3
Don't forget to attach the code bit link in post Description, need to check it first to know what's wrong, and what to do to fix.
+ 1
Fine will do it thanks