



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lecture from the introduction to c programming for engineers course covers data structures, specifically arrays, dynamic memory allocation using malloc and free functions, and the concepts of linked lists, stacks, queues, and trees. Dr. Jeffrey miller explains the logic behind these structures and provides examples of their usage.
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Jeffrey Miller, Ph.D.
Data structures consist of one or more variablesthat are logically related to each other - There is usually a set of functions available tooperate on the data too - We have already talked about one such structure - Array – all of the elements in an array are of the sametype and are stored consecutively in memory
A linked list is a linear collection of self-referential structures (called nodes),connected by pointer links struct node { int data; struct node *next_node; } struct linked_list { struct node *start_node; }
A stack is a constrained version of a linkedlist, though it is a LIFO data structure
A queue is a constrained version of a linkedlist, though it is a FIFO data structure
Homework #8 is posted!