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