Computer Programming (I)

Fall 2004
Prof. Yukon Chang


Sample Programs     Lecture Slides (last update: 1/6/2005)

The following is a list of handouts and papers to be covered in the course.

Date

Article/Link

Description

1/17/2005

Grades

Grades for this semester and how to prepare for the next semester.

1/11/2005

About Final Exam

Some hints about the final exam to be held in class on Jan 13, 2005.

1/11/2005

Key to Assignment 7

We will use this, instead of key to assignment 6, to illustrate simple command-line arguments.

1/11/2005

Pointer Quiz

This is the quiz given on 1/6, posted here for your reference.

1/4/2005

Key to Assignment 6

We will use this to illustrate simple command-line arguments.

12/28/2004

Assignment 7

Programming assignments on recursion. The due date is Jan. 4, 2005.

12/13/2004

Sample Exam 2

The second midterm exam will be held in class Thursday, Dec. 16. As in the first midterm, students with an ID less than 9303049 will take the test in Room 50314. Those with an ID greater than 9303049 will take the test in Room 50304, the original classroom. Click here to get a copy of the sample written test.

12/8/2004

Make-up Exam

This is the make-up exam for midterm #1 held on 12/7/2004.

12/7/2004

Unix Introduction

For those of you who are comfortable with the pace of the course and also are willing to learn more, I would suggest you pick up UNIX an a second operating system. I’ll arrange to give you UNIX accounts. In the meantime, please read the UNIX introduction.

12/2/2004

Solution to Assignment 4

You can use part of this program to solve assignment 6. Note that comments in this short program are scanty. Make it an exercise to provide your own comments after reading and understanding it.

12/2/2004

Assignment 6

Assignment 6 is a complete calendar program. The due date is Dec. 9, 2004. Executables can be found here.

11/30/2004

TAs and their office hours

There are two teaching assistants for this course:

施明志: email: m9203035@stmail.isu.edu.tw, office: 3107, 分機:3949.

郭東黌: email: m9303014@stmail.isu.edu.tw, office: 3107, 分機:3949.

The TA hours are: 施明志: 7:00 ~ 9:30PM Tuesday, 郭東黌: 7:00 ~ 9:30PM Monday

11/30/2004

Quiz 1

The first in-class quiz of this course. There will be more in the future.

11/18/2004

Assignment 5

Assignment 5 consists of 12 simple loop problems. The due date is Nov. 25, 2004.

11/9/2004

Assignment 4

Assignment 4 consists of a number of minor modifications to a sample program from [K&R]. The due date is Nov. 18, 2004. Executables can be found here.

11/2/2004

Extra Office Hours

Your TAs will be in Room 3513 Tuesday and Wednesday evenings from 18:30 to 20:00 to help you with your questions before the written test on Thursday.

11/1/2004

Lecture Recording

I’ve put some lecture recording in one of my streaming servers http://140.127.185.245. Go to 節目介紹and find our course at the bottom of the listing. Audio quality in some of the recordings is not terribly good. Some lectures were not recorded successfully due to even more severe technical problems. Sorry, folks.

11/1/2004

Sample Written Test

The written test part of the first midterm exam will be held in class Thursday, Nov. 4. Students with an ID less than 9303049 will take the test in Room 50314. Those with an ID greater than 9303049 will take the test in Room 50304, the original classroom. Click here to get a copy of the sample written test.

11/1/2004

Extra Office Hours

I will be in 3119 from 20:30 to 21:30 tonight to help you prepare for the midterm exam.

11/1/2004

Solution to Assignment 3

You can find the solution to assignment 3 here. In time, you will learn that there are many ways to accomplish the same task, see problem 3.4 for an example.

10/28/2004

Sample Lab Test

The lab test part of the first midterm exam will be held from 4:30 to 5:20 on 11/2/2004. Students with an ID less than 9303049 will take the test in Room 3119. Those with an ID greater than 9303049 will take the test in PC Lab VI (第四電腦教室). Click here to get the sample lab test.

10/26/2004

Assignment 3 Executables

Download the executable programs for assignment 3 here. In a DOS box, run each program to see what your program should do.

10/21/2004

The winner is …

For Prize Problem #1, the winner is TypeR. Congratulations! It took about 18 hours before the problem was solved. Watch for the next prize problem coming your way soon.

(To TypeR: Come see me in my office to collect your prize.)

10/21/2004

Assignment 3 due day changed

The due day for assignment 3 has been extended to midnight, 10/28/2004. Remember, you can discuss the problems with others, but you cannot copy program from someone else.

10/20/2004

Prize Problem #1

Write the “smallest” executable C program, i.e., one with a minimum number of characters in the source code. Post your answer on 陽光椰林班版。This first person to come up with the correct answer wins.

10/19/2004

Assignment 3

Assignment 3 consists of a number of minor modifications to sample program from Section 1.4 of [K&R]. Follow this link to read more about it.

10/15/2004

How to enter EOF from a keyboard

We mentioned that the way to indicate an EOF from the keyboard is system-dependent. To generate an EOF on Microsoft-based personal computer, type in control-Z at the beginning of a line then type the Enter key.

If stdin is redirected to read from a file, there is no need for control-Z. When all bytes are exhausted, getchar() can detect this situation and returns EOF.

10/14/2004

ASCII table

The ASCII table can be found here.

10/13/2004

Assignment 2 demo

Read this link to find out how to turn in your assignment 2 with a demo.

10/7/2004

Assignment 2

Do both Exercises 1-3 and 1-4 on page 13 on [K&R] as assignment 2. Don’t be scared off by the choice of words in 1-4: when the authors say “write a program to print …”, they actually mean “modify one of the sample programs to print …”.

10/6/2004

Assignment 1

You probably have noticed that assignment 1, the assignment you just turned in, is nothing but a variation of Exercises 1-1 and 1-2 from [K&R].

9/16/2004

syllabus

This is the syllabus for this course