[\<- Notes 01/13](01-13.md) --- Notes 01/15/2020 # Review Pointers Below is an example to demonstrate pointer precedence: ``` int x[] = {0, 5, 10, 15, 20, 25, ...}; int y = 5; int *p = x; y = ++*p printf("%d, %d\n", y, *p); y = *(++p); printf(...); //ditto y = ++(*p); printf(...); //ditto ``` The code outputs the following: ``` 1, 1 5, 5 6, 6 ``` --- # Introduction to Structures in C -`Earlier we talked about data types: int, char - A Structure allows for multiple data types in one array - Structure Basics - A structure is a collection of values, called members - Outline of Structure Definition: ``` struct name{ variable declaration; variable declaration; ... }; ``` - Example: ``` struct info{ int number; char character; char string[10]; int array[10]; }; ``` - Let's see the memory: | | | | - | - | | | | | Real_Info | 55 bytes of storage | | | | - You can also create pointers to data structures - Defines a structure type --- - Another Example: ``` struct node{ int number; struct node *link; }; ```