20-CS-122-001 Computer Science II Spring 2012
Function Pointers, structs, qsort

Virtual functions, classes, inheritance, lists, queues, stacks, applications

SlideDescription
pointer to function Simple example of pointer to function passed as argument to subroutine
pointer to struct Show typedef, sizeof, '.x', '(*()).x', and '->'
qsort an array Simple use of qsort on an array of int triples with compares for each
qsort array of pointers Same as above except the array to sort is an array of pointers to int triples
qsort array of strings Same as above except qsort and array of strings
qsort cables Sort an array of random cables (for MSN problem) using qsort
qsort cables from file Same as above except take the input from a file specified on command line
qsort cables from stdin Same as above except take the input from stdin and use redirection
Read file data Read string data into an array of strings - one pass through file
Read file data, 2 passes Same as above except make preliminary pass to find number of strings
Rd file, 2 pass, delay alloc Same as above except allocate space for each string individually
Power Point
qsort general Describes the operation of qsort
qsort example Illustrates location and movement of data using qsort