CS240 Spring 2011: Programming in C


Class Information
Lectures and Labs
Resources




Class Information
Instructor TA Office Hours
    Dasarath Weeratunge, W,F, 10:30- 11:30 AM, LWSN 3133
    Aditi Gupta, Th 11:30 - 12:30 PM, 3:00 - 4:00 PM, LWSN 2161
    Satish Kumar Eerpini, Tu 4:30 - 6:30 PM, LWSN B116
    Sagar Kumar, Th 3:00 - 5:00 PM, LWSN B116
    Brent Gregory Roth, M,W, 2:15 - 3:15 PM, REC 222
    Alicia Klinvex, F 11:30 - 1:30,
Class Schedule
    MW 3:30pm -4:20pm Smith Hall 108
Textbook
  • C Programming Language (2nd Edition), Brian W. Kernighan and Dennis M. Ritchie
Mailing list

The class mailing list is cs240-spring2011. To be added to the list sent an email to mailer@cs.purdue.edu, with the body containing the text 'add your_email to cs240-spring2011'.

Mail sent to 240-Spring2011-TAs@cs.purdue.edu will be sent to all the TAs as well as myself and can be used to ask questions about the labs and projects.

Academic Integrity

    Academic honesty and ethical behavior are required in this course, as it is in all courses at Purdue University ( here is the guide for academic integrity). The class will be conducted according to the policy written by Professor Gene Spafford. Please take the time to read it carefully. This will be followed unless I provide written documentation of exceptions.

    You are encouraged to talk with the professor about any questions you have about what is permitted on any particular assignment.

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

    Exams are closed books and closed notes.
Exams

Midterm: February 23, 2011. closed book, closed notes. In class. K&R Chapters 1 - 6.7

Midterm: March 30, 2011. closed book, closed notes. In class. K&R Chapters 1 -7
   Sample Midterm   Sample Midterm Answers
   Additional Review Questions    Solutions to additional review questions
   Midterm 2 solutions

Final Exam: May 5, 2011, 8-10AM, CL50 Room 224
   Sample Final    Sample Final Solutions
   Supplemental Final Exam Questions   Supplemental Final Exam Solutions


Lectures

Lecture slides will be posted below. Projects and labs will be posted on the website on Mondays. You will typically have one week to complete the labs, and two weeks (sometimes more) to complete the projects. YOU MUST SUBMIT ALL YOUR PROJECTS AND ALL LABS.



Week Monday Wednesday Laboratories Projects
Week 1 Lecture 1 - Class policy. Historical Context. Introduction. Lecture 2 - Language overview. Libraries. Build environment. No lab this week No project this week
Week 2 MLK Day. NO CLASS. Lecture 3 - More on Types. Lab 1. Makefiles, build environment, simple programming tasks. No project this week
Week 3 Lecture 4 - Operators and Expressions. Lecture 5 - Functions and Scoping. Lab 2. Programming with conditionals and loops. Project 1: Binary coded decimals. Due date: February 9, 2011.
Week 4 Lecture 6 - Functions and Scoping (cont) Class cancelled Lab 3. Recursion. Project 1 (cont)
Week 5 Lecture 6 - Recursive Functions. Lecture 7 - Structures Lab 4 - Linked lists. Project 2: Numerical Methods decimals. Due date: February 28, 2011.
Week 6 Lecture 8 - Dynamic Memory Allocation Lecture 9 - Assertions and Error Handling Review Session in lab this week Project 2 (cont)
Week 7 Lecture 10 - Unions Midterm Exam No lab Project 2 (cont)
Week 8 Midterm Solutions Review Midterm Solutions Review Lab 5 - Resizable Arrays. Project 3: Memory management.
Due date: March 11, 2011.
Week 9 Lecture 11 - Function Pointers (basics) Lecture 12 - Function Pointers (applications) No new lab this week. Lab sessions will discuss the project. Project 3 (cont)
Week 11 continuation of lectures 11 and 12 continuation of lectures 11 and 12 Lab 6 - Using function pointers. No project this week.
Week 12 Lecture 13 - File I/O Midterm Exam 2 Lab sessions this week will discuss the project. Project 4: Generating Fractals.
Week 13 File I/O (cont)
Lecture 14 - Errors
Lecture 15 - Exception Handling Lab 7 - File I/O. Project 4 (cont)
Week 14 Exception Handling (cont) Lecture 16 - Signals Lab sessions this week will discuss the project Project 5 Bitmap manipulation.
Week 15 Lecture 17 - Concurrency and Parallelism Lecture 18 - PThreads Lab 8 - Signals. Project 5 (cont).
Week 16 Lecture 18 (cont) Final Exam Review No lab this week. No project this week.
Resources