Learning Goals

Course-level learning goals

  1. Competence in designing, writing, reading, debugging and testing C code.
  2. Understanding of when C is an appropriate tool to solve a computational problem.
  3. Demonstration of best practices while writing C code: adherence to code style and documentation conventions; proper memory management; and judicious use of utilities such as debuggers, profilers and compiler options.
  4. Able to explain C code in plain English; to clearly communicate the advantages, disadvantages, and design decisions involved in computational problems.

Specific learning goals

In addition to the four course-level learning goals, the following specific learning goals will also be covered in this course:

  1. Students should be fluent in writing, debugging and reading the following C features, using proper code style:
    1. basic variables:
      1. int, double and char variables
      2. arithmetic operations using =, +, -, *, /, %, and shortcuts like ++, --, +=, etc
      3. type conversion between int, double and char
      4. the const keyword
    2. basic arrays and structs:
      1. int, double and char arrays
      2. 2D int and double arrays
      3. structs, using the struct keyword
    3. control flow:
      1. boolean statements, using the &&, ||, ~, == and less/greater equal operators
      2. conditionals: if and else
      3. loops: for and while
      4. functions, the void keyword, and return values
      5. recursion
    4. program interactions:
      1. basic I/O: printf, scanf
      2. basic file I/O: fprinf and fscanf
      3. argv and argc
      4. include statements
    5. pointers:
      1. pointers to:
        1. int, double and char variables
        2. structs and arrays
        3. functions
        4. other pointers
      2. pointer notation: *, &, . and ->
      3. NULL, malloc, sizeof, and free
    6. useful features:
      1. the math.h library
      2. the ctype.h library
      3. the string library: string copy, string length, string concatenation, string comparison
      4. srand and rand
      5. assert
  2. Students should be able to use the following utilities:
    1. ssh; Unix commands cd, ls, scp, time
    2. compilation with gcc -o
    3. compilation with gcc -g and simple use of gdb (or use of another debugger)
    4. simple makefiles
    5. optimization with gcc
    6. gprof
    7. valgrind
    8. svn
  3. Data structures:
    1. Students should conceptually understand and be able to write code to create, insert to, delete from, traverse and find on the following data structures:
      1. singly-linked lists
      2. doubly-linked lists
      3. stacks
      4. queues
      5. binary trees
      6. binary search trees
      7. hash tables
      8. graphs
    2. Students should be able to compare and contrast the ADTs above, plus singly- and doubly-linked lists
    3. Students should be able to recognize the performance of linked lists, stacks, queues, binary trees, BSTs and hash tables.
  4. Search algorithms:
    1. Students should conceptually understand and be able to write code to perform the following searches:
      1. binary
      2. linear
      3. sentinel
    2. Students should be able to compare and contrast the search algorithms above
    3. Students should be able to recognize the performance of the search algorithms above
  5. Sorting algorithms:
    1. Students should conceptually understand and be able to write code for the following sorts:
      1. insertion sort
      2. selection sort
      3. mergesort
      4. quicksort
    2. Students should be able to conceptually understand the following sorts (won't necessarily be asked to write code for):
      1. heapsort
      2. bucket sort
      3. radix sort
    3. Students should be able to compare and contrast the sorting algorithms above
    4. Students should be able to recognize the performance of the sorting algorithms above
  6. Students should be able to:
    1. understand:
      1. the advantages and disadvantages of C in comparison to Python and Matlab
      2. how C variables, arrays and structs are stored in memory
      3. how pointers work
      4. how pseudorandom numbers are generated, and the necessity of seeding
      5. the concept of recursion
    2. be able to translate:
      1. Python code into C and vice versa
      2. pseudocode into C and vice versa
      3. between [ ] and pointer notation for arrays
      4. between iterative and recursive solutions
    3. draw:
      1. memory diagrams involving pointers to variables, arrays and structs
    4. identify:
      1. when a recursive algorithm is tail-recursive