Data Structures: Linked List with C

David Mentgen
TestingOnProd
Published in
2 min readJan 16, 2022

If you’re learning to program, linked list is one of the most basic data structures that you can learn! This week, I’ll be showing you how to work with doubly linked lists using C programming.

Simply put, a linked list is a sequence of nodes that contain data and a reference point to the next node in memory. There are many different variations of linked lists with different capabilities that may better fit different use cases, but in this blog post I’ve created a doubly linked list which is based on the code I provided for the Python equivalent HERE!

Code

Running Code

gcc ./LinkedList.c -o LinkedList; ./LinkedList

Conclusion

As I previously mentioned, there are many different ways to create a linked list. My provided example is just one of many that you can find on the internet. I just hope that somebody out there can find my example useful in some way.

Feel free to also follow me via my other social media accounts: Instagram, Twitter, Facebook, and WordPress!

As always, if you liked what you read and you’d like to support me, please consider buying me some coffee! Every cup of coffee sent my way helps me stay awake after my full-time job so that I can produce more high quality blog posts! Any and all support would be greatly appreciated!

Originally published at http://testingonprod.com on January 16, 2022.

--

--