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