Computer programming
Instructor: Marius Minea, marius@cs.upt.ro (Office: B531. Phone: +40-256-403284)
Laboratory: dr. Alexandru Iovanovici, Nashwan Azhari, Raluca Groșan
Course: A109, Mon 12-14 (week 2 + odd weeks); Tue 10-12
Lab: B418a+b/B426/B614, Thu 8-12; Fri 8-12 (even weeks)
Lab standings
Office hours: Wed 16h, B418b; Thu 12h, B418b; Fri odd weeks 10h, B418
Sample midterm solutions: sum of products, product of sums, rotate and swap, swap and rotate, increasing chars, split at uppercase
Course materials
An excellent pledge on how to be a student in a course (CS @ U. of Virginia)
last year's course
- Introduction
Sample program: use of conditional
- Recursion
Sample programs: box fractal, different variants for sum of series
- Characters. Assignment. Iteration
Sample programs: prefix expression, filtering HTML text
- Iteration. Side effects
Sample program: prefix to postfix expression
- Number representation. Bitwise operators
Sample programs: bitwise add, reverse hex digits, playing with bitmaps, split float
- Arrays
- Input/Output
Sample programs: ints line by line, simple string search, URL search
- Review: counting change, n choose k, replace chars, balanced parantheses, adding floats. Also see this summary
- Pointers
Sample programs: numbers from string, sort string array
- Dynamic allocation
Sample programs: read whole text, with limited lines; generic array minimum
- File I/O
Sample programs: check segment lengths in PDF files: v.1 v.2, bitmap size, stream bits
continued from class: hide a file in a BMP image and extract it
- Structures
Sample programs: float with bitfields, function term
- Modular compilation. Abstract datatypes. Integer lists: intlist.h, intlist.c
more list functions, header file, sample program. work with linked lists
queues: header, implementation, test program
- Hashing. Timing. Randomization. Hashtable: header, implementation, test program
Laboratory
- Lab 1: Introduction. Conditional expressions.
- Lab 2: Recursion.
Homework 2
- Lab 3: Character-based I/O.
- Lab 4: Character-based I/O.
Solved problem: conditional expression
- Lab 5: Bitwise operators.
Solved problems: round float, multiply floats (optional: full version with all checks)
- Lab 6: Arrays and bits.
- Lab 7: Strings and I/O.
- Lab 8: Strings, I/O, review.
Solved problem: XML format
- Lab 9: Pointers
Solved problems: hexadecimal float, text lines
- --- (holiday)
- Lab 11: Dynamic allocation
- Lab 12: Files
Structures
- Lab 13: Abstract datatypes. Lists.
Resources
If you're at a computer without a C compiler, you can compile/run code online, e.g., at JDoodle.
Books
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: Tue Feb 6 12:25:00 EET 2018