Computer Programming (I)

Fall 2005
Prof. Yukon Chang

Sample Programs     Lecture Slides (Last update: 12/31/2005)

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







最佳進步獎:陳平偉、曾 璞、吳佩珊(080A),獎金分別為400300200元圖書禮卷。



Final Exam

The final exam will be held on Jan. 11 at 8:40am at the same place the previous exam took place. Click here to see some tips on how to prepare for the final.


New Deadline for Assignment #4

Per your request, the deadline for assignment 4 is postponed to midnight, Thursday, December 29, 2005.


Assignment #4

This assignment is due midnight, Saturday, December 24, 2005, for all three classes.


Third Midterm

The third midterm will be held on Dec. 21 at 8:40am. The exam rooms for the three classes are listed below:

B班: Room 50701

重修班:Room 50716

週末班:Room 50702

The format of this exam will be similar to that of the second midterm. Last year’s sample exam (posted on 12/13/2004) may help you prepare for the exam.


Assignment #3

This assignment is due midnight, Saturday, December 10, 2005, for all three classes. You can download an executable version of the program here to help you better understand the problem.



資工一B:121 三四節,50710






資工一B補救方案           重修班補救方案                 週末班補救方案


Second Midterm

The second midterm will be held next week, the official midterm week. Here are the times and places for the exam:

B班:11/8, Tuesday, 10:20am, Room 50701

重修班:11/9, Wednesday, 1:30pm, Room 50701

週末班:11/12, Saturday, 9:20am, Room 50509


I do not plan to prepare any sample exam this semester. You should take a look at last year’s sample exam (posted on 11/1/2004) to get an idea of what kind of problems may be on the exam. Also, make sure you work on assignment 2 because it will definitely help you answer some of the questions on the midterm exam.


Assignment #2

Like its predecessor, the second programming assignment also consists of 17 small problems, all of which deal with arrays. Copy this file (assignment2.c) and follow the comments provided in the printf statements. You should make sure you understand the problems before you start working on them. The executable version of the program can be found here. You can download it and run it in a DOS box. Your program should behave exactly like it.


The assignment is due midnight, Saturday, November 12, for all three classes. Sorry, no late submission allowed.


Entering EOF from the keyboard

To enter an EOF from a DOS prompt window, do the following:

1.     Press the Ctrl key and while holding it down, type z. (This combination is typically denoted as ^Z.) This must be done at the beginning of a line.

2.     Press the Enter key.


TAs and their office hours

There are three teaching assistants for this course:

郭東黌: email:, office: 3107, 分機:3949.

林長富: email:, office: 3107, 分機:3949.

陳冠億: email:, office: 3909, 分機:3950.


Their TA hours are:

郭東黌: 19:00 ~ 21:00 Monday at 3107.

林長富: 19:00 ~ 21:00 Wednesday at 3107.

陳冠億: 19:00 ~ 21:00 Tuesday at 3909.


Getting Help (1B)

Now that the midterm scores are out, those who did poorly on the exam (<60) should try to get help as soon as possible. Several of your classmates agreed to offer their help. If you would like to take advantage of this offer, please contact any one of them. Their names are listed below:


In return for their help, I will give them extra credits and teach them more advanced programming techniques. If your name is not on the list but you would like to help, please let me know.


Midterm Exam #1


l         B班: 10/11週二考, 學號小於9403069A的同學10:20-11:10考,大於9403069A的同學11:10-12:00考。

l         重修班: 10/12週三考, 學號小於9203127A的同學1:30-2:20考,大於9203127A的同學2:20-3:10考。

l         週末班: 10/15週六考, 學號小於9303079A的同學9:20-10:10考,大於9303079A的同學10:10-11:00考。

l         考試時請帶學生證。



You can find a sample test on last year’s web page. You should also study assignment 1 thoroughly when preparing the test.


Assignment 1

Copy this file (assignment1.c) and provide program fragments for all 17 problems in it. Although the number of problems may seem large, you have seen most of them in class already: Problems 1.1-1.6 are the for-loop problems shown on slide #26, and problems 2.1-2.6 are the same problems to be done with while-loops instead. Problems 3 & 4 are extra problems given in the practice session. For problems 5-7, you are asked to devise three new problems of your choice -- a test of your creativity and enthusiasm. It would be even better if you could explain what is special about each of these these problems.


This assignment is due at midnight, Wednesday, October 12 for all three sessions. It is to be turned in to This means you need to get an account on that server if you don’t have one yet.


Classrooms for the week 10/3-10/7

B班: Tuesday’s class will be held in 3119, Friday’s class in 50701

重修班: 3119

週末班: 3119


Classrooms for this week

B班: Tuesday’s class will be held in 3119, Friday’s class in 50701

重修班: 3119

週末班: 3119


Stuff from last year

Here are some stuff from last year that you will find useful:

l         slides: last year’s slides are available either as a single pdf file here, or as separate files here

l         lecture notes: most of last year’s lectures were screen-captured and kept on our streaming server, -->節目介紹-->專業課程-->計算機程式一(2004)-->影片列表

l         other stuff, such as sample programs, assignments and their solutions, etc., can be found at

Since the way I will be teaching this course will not differ very much from last year, I strongly urge you to study them before coming to the lecture.



This is the syllabus for this course