Skip to Main Content
C Programming: Visual Quickstart Guide
book

C Programming: Visual Quickstart Guide

by Larry Ullman, Marc Liyanage
October 2004
Beginner content levelBeginner
408 pages
9h 24m
English
Peachpit Press
Content preview from C Programming: Visual Quickstart Guide

Introduction to Linked Lists

The problem with static arrays (like the array of structures in our previous example) is that they can have only a finite number of elements. This value is set during compilation, meaning that when you write the program, you must know and set the maximum number of elements to ever be stored. In Chapter 10, “Managing Memory,” you learned how to make a dynamically sized array using realloc(), which increased the amount of available memory as needed. Linked lists allow you to combine these two concepts, creating a growing list of structures.

A linked list takes structures one step further by making them self-referential. This is accomplished by defining a structure as containing both data (the actual information being ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Intermediate C Programming

Intermediate C Programming

Yung-Hsiang Lu
Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey

Publisher Resources

ISBN: 0321287630Purchase book