V Lecture 13 — midterm, hw4, linked list example
V midterm
V will have reference material
* you won’t need to memorize options for commands
* you won’t need to memorize the various test options
V the shell
V basic operations
V redirection and piping
* >, >>, <, etc.
* command1 | command2
V command substitution
* command2 $(command1)
* reading man pages
V scripting
* if, while, read, for
* processing arguments
V regular expressions and sed
* character classes, quantifiers, grouping, anchors
* using sed to substitute or delete lines
V C
V pointers
* draw a picture of memory
V structs
* typedef
V memory model
* malloc, free
* memory leaks
V homework 4
V organization
V trie data structure
* struct representing a node (recursive data structure)
V functions:
* create/init
* insert
* lookup
* destroy
* trie.h — declarations
* trie.c — implementation
V main
* #include “trie.h”
* probably shouldn’t define any structs, additional functions, etc.
V linked list example
* see posted files and shell recording
V use valgrind to detect memory errors
* valgrind COMMAND
* should report 0 bytes lost