6.087 | January IAP 2010 | Undergraduate

Practical Programming in C


This course makes use of Athena, MIT’s UNIX-based computing environment. OCW does not provide access to this environment.

Course Meeting Times

Lectures: 5 sessions / week for 3 weeks, 1.5 hours / session

Labs: 1 session / week for 3 weeks, 3 hours / session


This course assumes a basic understanding of the principles of programming. Prior knowledge of C is neither expected nor desired. The primary prerequisite of this course is 6.00 Introduction to Computer Science and Programming, 1.00 Introduction to Computers and Engineering Problem Solving, 6.01 Introduction to Electrical Engineering and Computer Science I, or another introductory programming course at MIT. If you are unsure of the adequacy of your programming background, please speak to a member of the course staff as soon as possible. As the duration of this course is only three weeks, the material will be covered at a relatively fast pace, and catching up will be difficult.


There is no required text for the course. However, the following text is highly recommended:

Kernighan, Brian, and Dennis Ritchie. The C Programming Language. 2nd ed. Upper Saddle River, NJ: Prentice Hall, 1988. ISBN: 9780131103627.

This text provides a concise and thorough coverage of the C programming language, including exercises. Suggested readings from this book may enhance your understanding of the material covered in lectures.

Lectures and Lab Sessions

While attendance will not be formally taken at the lectures, attending every lecture is crucial to learning the material necessary to complete the assignments and projects. Handouts generally will not be provided in printed form. However, slides will be posted before lectures, and you are welcome to print them yourselves. Some students may seek to take another course that overlaps with the lecture time and either come late to lecture or leave early. This should be avoided, as it disrupts the lectures and distracts the rest of the class. Please avoid interrupting the class by arriving late or leaving early.

Due to space constraints, the laboratory sessions are only open to those students taking the class for credit. The weekly laboratory sessions are mandatory to attend (for those receiving credit). As explained later, the projects will have both in-lab and out-of-class components, and it is expected that you will complete the in-lab portions during the three hours on Wednesday night. During the lab sessions, you will work in pairs to complete programming exercises that are connected to the overall programming project for that week. Lab assistants will be in lab at the time to assist you and verify that you have completed the in-lab exercises. While students are welcome to bring their laptops to the lab, the staff encourages students to use the Athena Linux computing environment present on the machines in the lab. Using a single standardized development environment will make debugging easier and ensure consistent results across machines.


Homework will be assigned daily through the first two weeks (7 assignments) and generally must be handed in at the beginning of the next lecture. Like any programming language, C is most easily mastered by using it to write programs. Therefore, the assignments will include small programming exercises. Homework will be graded coarsely (on a scale of 0-2), where 0 = minimal understanding demonstrated or inadequate effort shown in completing the problems, 1 = basic understanding of the concepts, but too many missed details, and 2 = thorough understanding of the concepts. Solutions to the homework will be provided after the assignment is due, so no late homework will be accepted or graded. If you have questions or desire additional feedback about a homework problem, please go to any of the staff’s office hours for assistance. Because of the course grading scale, there will be no re-grades on homework.


In addition to the small programming exercises in homework assignments, this course will include three more extensive programming assignments in the form of projects. The first two projects will consist of an in-lab component composed of more structured programming problems dealing with specific concepts and an out-of-class component that will tie these concepts together to form a larger program. The in-lab component will be completed in pairs, and will require a lab assistant’s signature verifying satisfactory completion of the in-lab exercises to receive credit. The out-of-class component should be completed alone, and the final program will be due at the beginning of the following week.

The third (final) project will be more open-ended, to give you a chance to express your creativity, and expose you to a more realistic programming experience. In teams of two, you will propose and implement a program that involves using one or more publicly available libraries to accomplish some non-trivial task. Suggestions of possible libraries and related programs are provided in the project handout. A written proposal must be submitted and approved by the instructors by the end of the second week of class. The final implementation and writeup of the project is due on the last day of class. The proposal and implementation should be completed as a team, but each student is expected to produce a final writeup and will be graded individually.

These projects are intended to provide you with the opportunity to develop a level of sophistication in programming in C. Therefore, in addition to correctness, points will be awarded for elegance, coding style, and a demonstrated understanding of the practical issues. Although some competitions reward obfuscation, practical programming requires a balance of clarity and conciseness. Therefore, all code should be well-documented, with comments, and the structure of the code should be straightforward.

Course Grade

Homework 20%
Project 1 15%
Project 2 15%
Project 3 50%

This course is graded on a Pass/D/Fail grading scale. Grades will be assigned based on the staff’s best assessment of your understanding of the C programming language, roughly based on the grading scale above (Pass ≈ ≥ 70%). Failure to complete and turn in homework assignments or the projects on time impedes the staff’s ability to assess your level of understanding and may result in a failing grade.

Collaboration and Cheating Policy

You are welcome to discuss assignments and laboratory projects with other students, provided that all work turned in must be your own. If you do discuss your work with other students on assignments, please list your collaborators at the top of your assignment, underneath your name. This does not excuse you from submitting your own work! For the in-lab parts of laboratory projects completed in teams, both team members should contribute equally and will be graded individually. The write-ups and out-of-class portions of labs must be completed independently.

In summary, when you are turning in an assignment with your name on it, what you turn in must be your work, and yours alone. Cheating will not be tolerated.

Course Info

As Taught In
January IAP 2010
Learning Resource Types
Lecture Notes
Programming Assignments with Examples