Useful links for linked lists in c

  • Thread starter ria_m
  • Start date
  • Tags
    Links
In summary, if you are looking for useful links for linked lists in c, a simple internet search will provide thousands of options. However, many of these links may have limited information. If you want more detailed information, it may be helpful to post your relevant code and ask for specific help. In terms of understanding how to iterate through a list and access data elements, it may be helpful to review the structure of a list node and the syntax for referencing variables. Additionally, it is important to consider what type of data you are working with and use an appropriate comparison. One useful resource for learning about linked lists in c is the tutorial at cprogramming.com.
  • #1
ria_m
4
0
i need useful links for linked lists in c!thanks
 
Technology news on Phys.org
  • #2
  • #3
well most of them they have limited information for them...i'm trying to find something more detailed..i want to compare the list's node and I'm little confused!
 
  • #4
OK, post up your relevant code and maybe we can help you. You will find that each implementation is different, so if you are looking for something specific to the way you are doing it, you might not find it.

You should iterate through your list by following pointers to from one node to the next - do you understand how to do this?

Each node will contain a data element. Can you access this data element? I assume you have a struct representing your list_node - do you understand the syntax for referencing the variables inside?

What kind of data do you have? Are you using an appropriate comparison?

The first link that comes up for "c programming linked list" is a nice tutorial over at cprogramming.com - is this not helpful to you?

http://www.cprogramming.com/tutorial/c/lesson15.html
 
  • #5
thanks for your help!
 

1. What are linked lists in C?

Linked lists in C are a data structure that allows for dynamic memory allocation and efficient manipulation of data. It is composed of nodes that contain both data and a pointer to the next node in the list.

2. How do I create a linked list in C?

To create a linked list in C, you must first define a struct that represents a node in the list. Then, you can use the malloc() function to allocate memory for the nodes and use pointers to connect them together.

3. What are the advantages of using linked lists in C?

Linked lists in C have several advantages, including dynamic memory allocation, efficient insertion and deletion operations, and the ability to store data of varying sizes. They are also flexible and can easily be modified to fit the needs of different applications.

4. How do I insert or remove elements in a linked list in C?

To insert an element in a linked list, you must first create a new node and update the pointers to link it to the rest of the list. To remove an element, you must update the pointers to "skip" over the node you want to remove and then free the memory allocated to that node.

5. Are there any useful resources for learning more about linked lists in C?

Yes, there are many online tutorials, articles, and books available that provide in-depth explanations and examples of working with linked lists in C. Some recommended resources include "The C Programming Language" by Brian Kernighan and Dennis Ritchie, and the tutorials on GeeksforGeeks and Tutorialspoint websites.

Similar threads

  • Programming and Computer Science
Replies
16
Views
3K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
2
Views
650
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
4
Views
340
  • Programming and Computer Science
Replies
14
Views
4K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • Programming and Computer Science
Replies
15
Views
2K
  • Programming and Computer Science
Replies
1
Views
876
  • Programming and Computer Science
Replies
12
Views
1K
Back
Top