CIS 2500 Lecture Notes - Lecture 19: Linked List, C Dynamic Memory Allocation, Dynamic Structures

23 views2 pages

Document Summary

A data structure is used to organize (structure) data so that it is easy to manipulate (search, order, retrieve). A link or linked list is a common structure with many applications. It is also one of the easiest dynamic structures to build and use. Pointers are used to attach elements in the list into a chain. Elements in the list are usually structures. /* draw the diagram when you are free */ To build an element of the list, we must declare a pointer inside each list element. A list is considered to be ordered if they are placed in the list in order based on some part of each element. Adding an element to an ordered list involves changing the pointers to possibly many elements. Head create/malloc() a structure/elements with num = 5 in it and store it using a temporary pointer.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents