CS W1003: Introduction to Programming in C
Fall 1999
Tuesdays and Thursdays 4:10pm-5:25pm in MAT 312
Course Lecturer: Carl Sable
e-mail: sable@cs.columbia.edu
Office: 724 CEPSR (Schapiro Buidling)
Office hours: Tuesdays 6:00pm - 7:00pm and Wednesdays 2:00pm - 3:00pm
Office phone: (212) 939-7120
Qi Xu
e-mail: qxu@cs.columbia.edu
Office: 721 CEPSR (Schapiro Building)
Office hours: Mondays and Wednesdays 1:00pm - 2:00pm
The following TAs will hold their office hours in the TA room:
Damien Howard
e-mail: djh31@columbia.edu
Office hours: Wednesdays and Fridays 11:00am - 12:00pm
Naho Ogasawara
e-mail: no49@columbia.edu
Office hours: Sundays 12:00pm - 2:00pm
Xuan Pan
e-mail: xp6@columbia.edu
Office hours: Tuesdays 9:00am - 11:00am
Click here
to out Columbia's Computer Science TA Page!
"The C Programming Language, 2nd Edition" by Brian W. Kernighan
and Dennis M. Ritchie.
"Computer Science: A Structured Programming Approach Using C"
by Behrouz A. Forouzan and Richard F. Gilberg.
Both books are available at Papyrus.
Grades will be based on:
- 5 homeworks (15% each)
- a midterm (10%)
- a final (15%)
Late penalty for homeworks: 5 points (out of 100) for every 12 hour
period past deadline.
Homeworks assigned so far:
Instructions on submitting assignments.
Lecture notes were converted automatically from Word to HTML format
by Microsoft Word. Much of the spacing is changed, and indenting of
code is lost! The notes were written for me to help teach the class,
and were not intended for students as learning material. Also, I often change
things during lectures; I skip segments of my lecture notes, add material,
and answer questions. Lecture notes should not be considered a
substitute for lectures, but rather a supplement. For those of you with
access to Microsoft Word 97, I am also providing links to the lecture notes
in their original format (spacing intact).
- Tuesday, Sep 7: course information, history of programming,
"Hello World!".
Suggested Readings:
- F&G: 1.1-1.3, 1.4-1.6, 2.1
- K&R: 1.1
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Sep 9: comments, variables, declarations, expressions,
constants.
Suggested Readings:
- F&G: 2.2-2.7, 3.1
- K&R: 2.1-2.2, 2.4
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Tuesday, Sep 14: boolean expressions, if, else, precedence, switch, break.
Suggested Readings:
- F&G: 3.2-3.4, 5.1, 5.2 (pp. 158-166), 5.3 (pp. 173-177)
- K&R: 3.1-3.3 (ignore commands you don't understand)
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Sep 16: CLASS CANCELLED DUE TO HURRICANE!
- Tuesday, Sep 21: continue previous topic (no new notes).
- Thursday, Sep 23: while, do while, for, nested loops, break, continue,
HOMEWORK #1 ASSIGNED.
Suggested Readings:
- F&G: 6.1-6.5, 6.7
- K&R: 1.2, 1.4
Homework #1.
Homework #1 in Microsoft Word 97 format.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Tuesday, Sep 28: standard input and standard output, printf, scanf,
getchar, putchar, redirecting.
Suggested Readings:
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Sep 30: arrays, two-dimensional arrays.
Suggested Readings:
- F&G: 8.1-8.2, 8.7 (pp. 349-354, ignore program 8-12)
- K&R: 1.6
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Monday, Oct 4: HOMEWORK #1 DUE AT MIDNIGHT.
- Tuesday, Oct 5: functions, globals, HOMEWORK #2 ASSIGNED.
Suggested Readings:
- F&G: 4.2, 4.3 (pp. 106-113), 4.5, 8.3
- K&R: 1.7-1.8
Homework #2.
Homework #2 in Microsoft Word 97 format.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Oct 7: structured programming (useful for homework #2).
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Tuesday, Oct 12: debugging, tracers, gdb.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Oct 14: pointers, pointers passed to functions.
Suggested Readings:
- F&G: 9.1-9.5, 9.6 (pp. 394-396)
- K&R: 5.1-5.2
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Tuesday, Oct 19: arrays and pointers, malloc, free.
Suggested Readings:
- F&G: 9.8, 10.1-10.2, 10.5 (ignore realloc and calloc)
- K&R: 5.3 (ignore strlen)
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Wednesday, Oct 20: HOMEWORK #2 DUE AT MIDNIGHT.
- Thursday, Oct 21: midterm review, sample questions.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Tuesday, Oct 26: MIDTERM.
Midterm in Microsoft Word 97 format.
Midterm in postscript format. (You can download
to your account and use "lpr" to send it to a printer.)
- Thursday, Oct 28: strings, HOMEWORK #3 ASSIGNED.
Suggested Readings:
- F&G: 11.1-11.2, 11.3 (pp. 477-482, ignore fgets and fputs), 11.5
- K&R: 5.5, Appendix B2-B3
Homework #3.
Homework #3 in Microsoft Word 97 format.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Tuesday, Nov 2: NO CLASS.
- Thursday, Nov 4: text files, midterm solutions.
Suggested Readings:
- F&G: 7.1-7.3
- K&R: 7.5 (pp. 160-161)
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Monday, Nov 8: HOMEWORK #3 DUE AT MIDNIGHT.
- Tuesday, Nov 9: recursion, HOMEWORK #4 ASSIGNED.
Suggested Readings:
Homework #4.
Homework #4 in Microsoft Word 97 format.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Nov 11: bubble sort, selection sort, insertion sort,
merge sort, sequential search, binary search.
Suggested Readings:
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Tuesday, Nov 16: structures, typedef, pointers to structures.
Suggested Readings:
- F&G: 12.1, 12.3-12.4
- K&R: 6.1-6.2
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Nov 18: linked lists, creating nodes, inserting nodes,
searching for nodes, deleting nodes.
Suggested Readings:
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Monday, Nov 22: HOMEWORK #4 DUE AT MIDNIGHT.
- Tuesday, Nov 23: linked lists, storing counts in nodes, reversing lists,
binary trees, HOMEWORK #5 ASSIGNED.
Homework #5.
Homework #5 in Microsoft Word 97 format.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Nov 25: NO CLASS.
- Tuesday, Nov 30: multiple files, makefiles, static variables,
command line arguments.
Suggested Readings:
- F&G: 15.1, 15.4, 15.6
- K&R: 4.3-4.6, 4.11.1, 5.10
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Dec 2: goto, rand, srand, time, system, exit.
Suggested Readings:
- F&G: 4.4 (pp. 129-131)
- K&R: 3.8
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Tuesday, Dec 7: tricky problems (not part of lecture notes), eligible
topics for final, a couple sample questions.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Wednesday, Dec 8: HOMEWORK #5 DUE AT MIDNIGHT.
- Thursday, Dec 9: sample programming questions for final.
Lecture notes.
Lecture notes in Microsoft Word 97 format.
- Thursday, Dec 16: DEADLINE FOR TAKING EARLY FINAL.
- Tuesday, Dec 21: FINAL EXAM (4:10 - 7:00 in 312 MAT).
About the final (early final,
actual final, and solutions included).
Please send questions or comments to
sable@cs.columbia.edu.