Intro
C: Study Guide
This
guide does not include topic
detail
Searching
sequential
binary
Sorting
Bubble
Selection
Insertion
Strings
1D
char arrays
End-of-string
sentinel, null character ('\0')
String
built-in functions
strlen
strcpy
strcat
strcmp
logically
1D array of strings = physically 2D array of characters
do
not index twice or end up with char, index once to get row which is
single
string
Input
and output with f/printf, f/scanf
Command
line arguments
argc
and argv: data types and uses
argv
can be thought of as 1D array of strings
Derived
types
typedef
structure
structure
templates
tagged
typed
passing
structures to
functions (default by value)
pointers
to structures
structure
operators
. ->
nested
structure
self-referential
structure
Arrays
of structures
Dynamic memory allocation
malloc
calloc
realloc
free
Linked
lists
definition
comparison
to an array and to a structure as a data structure with regard to
memory, type
of data stored, how data accessed
Pseudocode
for creating list, inserting node (stack, queue, or priority queue),
traversing
list
empty
list: first == NULL
Basic
list operations
insertion:
at beginning: LIFO, stack
at end: FIFO,
queue
sorted (lead and follow
pointers), priority queue
traversal:
temp pointer moves down list visiting
each node
**Different
situations for each type of list operation: empty list, insert/delete
first,
insert/delete middle, insert/delete last (may not get to this)