Computer programming

Instructor: Marius Minea, (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)

Lab standings

Midterm problems: balanced tree, heap, binary coded decimal, ordered nibbles, register names, string expressions
Sample exam problems
Midterm results
Exam results

Course materials

An excellent pledge on how to be a student in a course (CS @ U. of Virginia)

last year's course

  1. Introduction. Recursion
  2. Decision. Recursion. Characters.
    Sample program: box fractal
  3. Recursion. Assignment. Iteration.
    Programs: filter HTML input: keeping state, with nested loops
  4. Iteration. Side effects. Recursive text processing.
    word count, arithmetic expression
  5. Internal representation. Bitwise operators
    Sample programs: bitwise addition, stream bits, bitmap processing, float structure
  6. Arrays
  7. Input/Output
    Sample programs: read ints line by line, find URL, find word
  8. Pointers
    Sample programs: string to base 10, using strtol
  9. Pointer arithmetic. Function pointers
    Sample programs: using qsort, tracing comparisons
    Dynamic allocation
    Sample program: prefix expression from string
  10. 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
  11. 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
  12. Preprocessor. Modular compilation. Abstract datatypes
    Example: intlist.h, intlist.c, working with lists
  13. Implementing an abstract datatype.
    Sample program: reading an int list, list operations, array mergesort, queues: header, implementation, test program
  14. 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).
  1. Lab 1: Introduction. Recursion
  2. Lab 2: Recursion
  3. Lab 3: Character processing
    Homework 3 Solution
  4. Practice problems
    Lab 4: Input processing. Solved problems: s-expression, stacked expression.
  5. Lab 5: Bitwise operators. Solved problem: base64 encoding
  6. Lab 6: Bits and arrays.
  7. Lab 7: Arrays and I/O
  8. Lab 8: Pointers
  9. Lab 9: Pointers.
    Sample program: generic array minimum
  10. Lab 10: Dynamic allocation.
  11. Lab 11: Files.
  12. Lab 12: Structures.
    Sample programs: polynomial, continued fraction, zip file listing
  13. 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)
Marius Minea
Last modified: Fri Mar 10 11:30:00 EET 2017