Instructor: Marius Minea, email@example.com (Office: B531. Phone: +40-256-403284)
Lab assistant: dr. Alexandru Iovanovici, Nashwan Azhari
Course: Mon 12-14, A204; Tue 10-12, A109 (week 2 + odd weeks)
Lab: B418a+b, Thu 8-12; Fri 8-12 (even weeks)
Office hours: B418, Wed 17-19 (weekly), Fri 9-11 (odd weeks)
Midterm problems: balanced tree, heap, binary coded decimal, ordered nibbles, register names, string expressions
Sample exam problems
An excellent pledge on how to be a student in a course (CS @ U. of Virginia)
last year's course
- Introduction. Recursion
- Decision. Recursion. Characters.
Sample program: box fractal
- Recursion. Assignment. Iteration.
Programs: filter HTML input: keeping state, with nested loops
- Iteration. Side effects. Recursive text processing.
word count, arithmetic expression
- Internal representation. Bitwise operators
Sample programs: bitwise addition, stream bits, bitmap processing, float structure
Sample programs: read ints line by line, find URL, find word
Sample programs: string to base 10, using strtol
- Pointer arithmetic. Function pointers
Sample programs: using qsort, tracing comparisons
Sample program: prefix expression from string
- File I/O
Sample programs: print an integer byte by byte, write one binary int, read one binary int, write three binary ints, read three binary ints; bitmap size
- User-defined types
Sample code: date with bitfields, float with bitfields, flexible array member
Review: pointer arithmetic, find function call, strdup, sort text lines, vector of vectors, check PDF segments: v1, v2
- Preprocessor. Modular compilation. Abstract datatypes
Example: intlist.h, intlist.c, working with lists
- Implementing an abstract datatype.
Sample program: reading an int list, list operations, array mergesort, queues: header, implementation, test program
- Timing. Randomization. Exceptions. Review.
measuring time, random numbers, prefix expressions with exceptions
balanced parantheses, n choose k
animated addition of 8-bit numbers
If needed, use the online compilers at Coding Ground (gcc 5.3) or Codepad (old, gcc 4.1).
- Lab 1: Introduction. Recursion
- Lab 2: Recursion
- Lab 3: Character processing
Homework 3 Solution
- Practice problems
Lab 4: Input processing. Solved problems: s-expression, stacked expression.
- Lab 5: Bitwise operators. Solved problem: base64 encoding
- Lab 6: Bits and arrays.
- Lab 7: Arrays and I/O
- Lab 8: Pointers
- Lab 9: Pointers.
Sample program: generic array minimum
- Lab 10: Dynamic allocation.
- Lab 11: Files.
- Lab 12: Structures.
Sample programs: polynomial, continued fraction, zip file listing
- Lab 13: Abstract datatypes. Lists.
Other C resources (guides, standard, libraries)
General CS education
ACM/IEEE Computing Curricula, in particular Computer Science 2013 curriculum (see CS body of knowledge)
Last modified: Fri Mar 10 11:30:00 EET 2017