A Simple Doubly Linked List in C

I have a coworker who is taking some programming classes and I’ve been helping him with some of the basic of C and C++ programming. One of his recent assignments was working with linked lists and this got me thinking about them again. I don’t do any coding in my day-job and outside of work I find little time to code so needless to say I’ve gotten a bit rusty on my programming skills. I did find it interesting that while I was helping him understand linked-lists I found myself understanding them better than I remember when I was in school. So I set out to prove to myself I still had the basic skill necessary to write a simple doubly linked-list and this is that example.

There is little to no error checking in this code so it can be broken vary easily. The point of this was to force myself to remember all the intricacies of memory and pointer management in C. I leave this here as just a little nugget of something that may be useful to someone, someday, somewhere….