Course Content

The text book for this course is Al Kelley and Ira Pohl: `C by Dissection', Third Edition, Addison Wesley, 1996. We review Chapter 9 and thoroughly cover Chapters 10 - 14.

The links below take you to the listings of the programs we discussed in class.

Chapter 9 : Arrays and Pointers

  • L-1 Arrays, examples, relationship with pointers
  • L-2 Bubble sort; multi-dimensional arrays
  • L-3 Memory allocation, style, errors

    Chapter 10 : Strings and Pointers

  • L-4 Sentinel, initialization, an example
  • L-5 Using pointers to process a string
  • L-6 Problem solving: counting words
  • L-7 Passing arguments to main()
  • L-8 String handling functions in the standard library
  • L-9 Style, common errors, and system considerations

    Chapter 11 : Recursion

  • L-10 Recursive problem solving
  • L-11 Design of recursive algorithms
  • L-12 An example: drawing patterns on the screen
  • L-13 String handling using recursion
  • L-14 Binary search
  • L-15 Divide and conquer
  • L-16 more on divide and conquer
  • L-17 Iteration versus Recursion : Fibonacci
  • L-18 Iteration versus Recursion : Binary search
  • L-19 Review for Exam I
  • L-20 Exam I on Chapters 10 and 11

    Chapter 12 : Structures and ADTs

  • L-21 Declaring structures; Accessing a member
  • L-22 Operator precedence; Structures, functions, and assignment
  • L-23 Application : managing inventory of items (pointers versus arrays)
  • L-24 Typedef; Cross- and Self-Referential Structures
  • L-25 Printing and Creating linear lists
  • L-26 Printing and Creating lists of names
  • L-27 Count and Lookup; Insert and Append
  • L-28 Insertion and Deletion; Style and Common errors

    Chapter 13 : Input/Output and Files

  • L-29 The Output Function printf()
  • L-30 The Input Function scanf()
  • L-31 sscanf() and sprintf(); fscanf() and fprintf()
  • L-32 Accessing Files
  • L-33 An example: double-spacing a file
  • L-34 More options of fopen()
  • L-35 Temporary files
  • L-36 Common errors and accessing files randomly
  • L-37 Review for Exam II on Chapters 12 and 13
  • L-38 Exam II on Chapters 12 and 13

    Chapter 14 : Software Tools

  • L-39 Executing system commands; environment variables
  • L-40 The C compiler and the use of make
  • L-41 Timing C programs and creating libraries

    Review

  • L-42 Review on Strings and Recursion Click if you want answers
  • L-43 Review on ADTs and Files Click if you want answers
  • L-44 Review on Software Tools Click if you want answers