Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
The syntax of linked list in C programming?
I'm beginning to understand the concept of linked lists and structs but am a little unclear on the syntax. From what I gather so far,
struct node
{
int data; //data of variable
struct *next; //points to the next node in the structure
}
I'm unsure on how to write the syntax for the list.
Ultimately I want to create a 5 by 5 board for a wordsearch and have the list go through each element to check if the user inputs matched in of the possible words and then output a response; then update the table for the next round. (Basically create a very very simple word search). Thanks!
2 Answers
- ?Lv 77 years agoFavorite Answer
Could you describe your 5x5 requirements better? Can you help me understand how this table is updated each round and what the user is doing?
I suspect you are trying to figure out how to apply a tool that is inappropriate for your ultimate goal. If I'm right, learning more about linked lists may help in other ways but not in the way you expect here. It would be a dead-end study that you'd have to back away from, later.
- SadsongsLv 77 years ago
There's a good example at http://www.macs.hw.ac.uk/~rjp/Coursewww/Cwww/linkl...
Your pointer element in the structure should be struct node *next