Lecture 17: November 1, 2019

Reading: C text>, §10, 13.1–13.2
Due: Homework #3, due November 8, 2019


  1. Greetings and felicitations!
  2. How to write a recursive program
    1. Recursive selection sort (sort.c)
  3. Dynamic memory allocation
    1. Library functions malloc, realloc
    2. Example: change sort.c to handle any number of numbers (usort1.c)
  4. Structures
    1. User-defined datatype
    2. As fields: var.field, ptrvar->field
    3. Use example of list of numbers (usort2.c)
    4. Do insertion sort (linked.c)

UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: [email protected]
ECS 36A, Programming and Problem Solving
Version of October 31, 2019 at 11:50PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh