CMPS 5C: Introduction to Programming in C
Winter 2009

Prof. Scott A. Brandt

Computer Science Department
University of California, Santa Cruz


NEWS:

 

3/11/09 Here is the sample code from today's lecture: sample.c.


2/24/09 - OFFICE HOURS ARE CANCELLED tomorrow, Thursday, February 25.


2/23/09 - Homework 5 is now posted.


2/19/09 - As we discussed in class, because of the midterm on Friday, there is no homework due this Sunday!

2/19/09 - Office hours are cancelled today, Thursday, February 19


2/15/09 - The lecture notes for Chapter 4 are now posted. They are rather spartan because we worked through several examples. Look in the book for additional details.


2/2/09 - Based on student requests, I have added a second set of office hours on Thursdays from 10-12. If nobody attends I will drop them.

2/2/09 - The first midterms are graded and were returned in class today. To address student concerns, I have decided upon the following policy: the exam will only count toward your final grade if it increases that grade. If it hurts your grade, it will be dropped. Nevertheless, if you received 50 points or less on the exam, I encourage you to reexamine how you are studying the material and preparing for the exams. If you do not, you are unlikely to pass the class.


1/25/09 - MIDTERMS will be on Friday, January 30 (this Friday) and Friday, February 20. The final exam is Thursday, March 19 from 8-11 am. All exams are in the regular classroom.

1/25/09 - The slides for Chapter 3 are now online.

1/25/09 - Homework 3 is now online.

1/25/09 - My office hours are Mondays from 3-5. They are your time, but few people show up. Don't be shy about dropping by if you want to talk about anything related to the class.


1/15/09 - The first three homework assignments are now online. The first two are ungraded, but you must do them and turn them in. We will check only to make sure that they work and represent a good effort. Otherwise, they will not be graded.


1/14/09 - The slides are now online through Chapter 2.

1/14/09 - Our TA, Melanie, has created a small web page with helpful information about the labs. Check it out here.


1/7/09 - This area will contain information about the class including important announcements. Check back frequently for updates.


Time: MWF 9:30-10:40
Location: Physical Sciences 114
Instructor: Prof. Scott A. Brandt (sbrandt@cs.ucsc.edu)
Office/Office Hours: E2-347B, Mondays 3-5
TAs: Melanie Witt (mwitt@cs.ucsc.edu)
TA Office/Office Hours: TBD
Lab Hours: BE 105: Mondays 4:00-6:00 pm, Thursdays 10:00-12:00 am, Thursdays 2:00-4:00 pm
MSI Learning Assistant N/A
MSI Schedule: N/A
Prerequisites: None
Required Text: C by Dissection, Fourth Edition, by Kelley and Pohl
Optional Text: Any other C book, e.g., The C Programming Language, by Kernighan and Ritchie
Course Web Page: http://www.cs.ucsc.edu/~sbrandt/5C and http://www.cs.ucsc.edu/~mwitt"
Class Newsgroup: ucsc.class.cmp12a

Course Notes

This page contains the lecture notes for the course. I will put them up as soon as possible, but I may not always be able to do so before the corresponding class period.

General Lab Information

This section contains general information about things you will need to know how to do in order to do well in this class (and future classes as well). It includes information on using Unix, creating a program, and submitting homework assignments. If you need additional background information, you should definitely check out the resources CATS (Communications and Technology Services) provides. They are located downstairs in the Communications building. If you don't yet have a CATS account, click here to register.

TAs and Tutors

This section contains information about the lab times and when the TAs and tutors are available.

Lecture Supplements

This section contains additional information from the instructor to supplement the lectures. Materials will be added here as they become necessary.

FAQ (Frequently Asked Questions): See if your question is here!

This section contains some questions pertaining to programming that students frequently ask.

Required Text:

C by Dissection, Fourth Edition by Kelley and Pohl.

Evaluation:

  • 8 Homework/programming assignments (4 graded and 4 ungraded) [20%]
  • 2 Midterms [40%]
  • Final [40%]
A minimum of 50% on all three aspects of the grade is necessary but not sufficient to pass this class. This means, if you receive less than 50% on any one of the three parts (hw, quizzes, final), you will not pass, however, just because you score at least 50% on each part does not imply that you will pass. For example, someone that scored 51% on each of the three parts would almost certainly NOT pass. The policy is intended primarily to prevent students from "blowing off" the homework because it only counts 20% of the grade. You cannot pass this class if you do not do the homework and you are unlikely to do well on the exams if you don't do well on the homeworks.

Ungraded practice assignments: In addition to four graded programming assignments, there will be four, ungraded programming assignments. For these assignments you are free to consult freely with any of your classmates. The experience gained in completing these assignments will help you with the graded assignments and the exams, which must be solely your own work.

Academic Dishonesty: Any confirmed academic dishonesty including but not limited to copying programs or cheating on exams, will constitute a failure of the computer ethics portion of this class and may result in a no-pass or failing grade. You are encouraged to read the campus policies regarding academic integrity.

Facilities: This quarter you will using the Unix operating system for your programming assignments. You will use submit for turning in homework.

Homework: Turn in homework by using the submit procedures. It will not allow late work. Late work will not be accepted or graded. The program should be submitted in whatever form it is in - it is possible to receive some partial credit for a program that is not working. Homework is graded in terms of it being done in a good style, being correct, being concise, being readable, and being efficient.

Audience: This course is targeted towards students in technical majors. These are disciplines which emphasizes mathematics and problem solving. There are computer literacy and computer programming courses that are offered as preparation for non-technical major. If you are shaky in your preparation you should consider taking CMPS010, which is highly recommended.

Syllabus

Date Topic Reading
January 7, 9 Class Overview, Introduction Chapter 1
January 12, 14, 16 Lexical Elements, Operators, and the C System Chapter 2
January 19, 21, 23 Flow of Control Sections 3
January 26, 28, 30 Functions and Structured Programming Chapter 4
February 2, 4, 6 Character Processing Chapter 5
February 9, 11, 13 The Fundamental Data Types Chapter 6
February 16, 18, 20 Enumeration Types and typedef Chapter 7
February 23, 25, 27 Functions, Pointers, and Storage Classes Chapter 8
March 2, 4, 6 Arrays and Pointers Chapter 9
March 9, 11, 13 Strings and Pointers Chapter 10
March 19 Final Exam

Telephone: (831) 459-5042 / FAX: (831) 459-4829 / sbrandt@cs.ucsc.edu