CS240 Fall 2012: Programming in C


Instructor Class Schedule
    Tu,Th 10:30pm - 11:20pm EE 170
Lab Schedule
    All labs will be held in LWSN B148

  • Lab # 1 (48987): Friday, 9:30 - 11:20
  • Lab # 2 (51078): Friday, 3:30 - 5:20
  • Lab # 3 (45909): Thurs. 1:30 - 3:20
  • Lab # 4 (51077): Thurs. 11:30 - 1:20
  • Lab # 5 (45910): Friday, 1:30 - 3:20
  • Lab # 6 (59899): Friday, 9:30 - 11:20
Textbook
  • C Programming Language (2nd Edition), Brian W. Kernighan and Dennis M. Ritchie
Piazza
    Class annoucements, discussions, and online help available via Piazza.

Virtual Machine
    We have provided a VMWare virtual machine image containing all software, tools, and libraries that you will need for your assignments. The login and password necessary to access this image will be provided in the labs. Students who do not already have VMWare installed on their personal machines can do so by downloading VMWare player; this is a free download. Another free alternative is Virtual Box (which works for Mac OS).

Grading
    Lecture 1 (see below) describes the grading policy for the course.

    Exams are closed books and closed notes.
Lectures
    Lecture slides will be posted below. Projects and labs will be discussed in lab sections. YOU MUST SUBMIT ALL YOUR PROJECTS AND ALL LABS.
Syllabus


Week Tuesday Thursday Laboratories Goals
Week 1 Lecture 1 - Introductions. Class policy.
Video
Lecture 2 - C Overview.
Video
Lab 0 - Hello world, Twitter filter Unix intro., Compiling, Basic control-flow
Week 2 Lecture 3 - Data types.
Video (part 1)
Video (part 2)
Lecture 4 - Control flow
Video
Lab 1 - Anonymizing filter, censoring filter Basic string manipulation, array usage, basic I/O
Week 3 Lecture 5 - Types and machine representation. Lecture 6 - Functions.
Video
Lab 2 - Command-line arguments, string manipulation, parsing, libraries Understanding type representations, signed and unsigned arithmetic, program stack
Week 4 Lecture 7 - Pointers.
Video
Lecture 8 - Memory Management. Lab 3 - More on parsing, and pointers Pointers
Week 5 Lecture 9 - Structures.
Video
Review. Lab 4 - Twitter trends analysis. Dynamic memory allocation, structures, linked lists.
Week 6 Midterm I. Lecture 10 - Unions. Video Lab 5 - Adding unions, hexadecimal representation, and ciphers. Programming with union types.
Week 7 Lecture 11 - Function pointers.
Video
Lecture 12 - Sorting. Lab 6 - Sorting. Sorting, recursion
Week 8 October Break. Lecture 13 - Call stack, tools. Lab 7 - stack smashing, security hacking. memory layout
Week 9 Lecture 14 - Files. Lecture 15 - Signals. Project 1 - Order Book. Hash tables. data structures, dynamic memory management
Week 10 Midterm II (solutions). Lecture 16 - Assertions. Project 1 (cont)
Week 11 Lecture 17 - Concurrency. Lecture 18 - Posix Threads.
PThreads tutorial
Project 2 - Order Book using file I/O. basic file I/O, reading binary files, memory alignment
Week 12 Lecture 18 - Posix Threads (cont).
Lecture 18 - Posix Threads (cont). Project 2 (cont)
Week 13 Lecture 18 - Posix Threads (cont). Lecture 19 - Setjmp/Longjmpg Project 3 - Order Book using threads threads, signals
Week 14 No class Thanksgiving Project 3 (cont)
Week 15 Lecture 20 - Tools Lecture 22 - Analyzing C Programs Project 4 - Order book, threads and synchronization threads, synchronization
Week 16 Review Review Project 4 (cont)



Resources