Join Dan Gookin for an in-depth discussion in this video Building a linked list, part of Learning C (2014).
- Linked lists are considered an advanced C language topic.…That's because the linked list construction…uses pointers and memory allocation.…It's also a bit crazy to describe,…so I will be patient.…In this movie, you'll see how a linked list…is set up and configured.…I'll demonstrate how it's used…and how to access its members.…All this will be shown one step at a time,…so hang on.…In this code, the stats structure is defined.…
A pointer to that structure is declared at line 10.…Memory is allocated for the structure at line 14.…The structure is filled on lines 22 through 24.…Finally, the printf statement starting at line 27…displays the structure's values.…Build and run this code.…I'll type in a pitiful amount.…And it works.…Say you wanted to create more of these structures…by allocating additional chunks of memory.…
You could put them into an array.…An array of structures is something…that's completely possible in the C language.…But how big would you make the array?…If you run a bank, and you need this code…to keep track of the accounts,…
- Understanding a C program
- Adding comments
- Using escape characters
- Working with values and placeholders
- Introducing variables
- Making a decision with if
- Adding functions
- Manipulating strings
- Building arrays
- Nesting structures
Skill Level Beginner
1. Getting Started
2. Programming Basics
3. Program Flow Control
4. Intermediate C Language Concepts
5. Advanced C Language Concepts
Next steps2m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.