Course: 計算機程式 (Computer Programming)
Course Numbers: 504 10300 and 902 48060
Fall semester, 2004
Wednesday 1:20 – 3:10 PM, 資訊館102室.
(Class 01 Lab.: Thursday 1:20 – 2:10 PM, 工綜323室;
Class 02 Lab.: Thursday 2:10 – 3:10 PM, 工綜323室)
Web site: http://www.csie.ntu.edu.tw/~kmchao/c04fall
Instructor: 趙坤茂 Kun-Mao Chao (台大資訊工程系暨研究所)
Teaching assistants: 黃耀廷 (台大資訊工程研究所) d92023@csie.ntu.edu.tw
& 莊竣捷 (台大化工系助教) chemeng@ntu.edu.tw
Outlines:
1. Overview of Computers and Programming
2. Overview of C
3. Top-Down Design with Functions
4. Selection Structures
5. Loop Statements
6. Modular Programming
7. Simple Data Types
8. Arrays
9. Pointers
10. Structure and Union Types
11. Recursion
12. Other Advanced Topics
Grading Policy:
Homework assignments and class participation (25%)
Final project (15%)
Two exams (30% each, 60% in total)
Textbook:
“Problem Solving and Program Design in C” (Fourth Edition) by J.R. Hanly and E.B. Koffman (2004), Addison Wesley. ISBN 0-321-21055-7 (新月圖書代理)
Reference book (not required):
趙坤茂 張雅惠 黃寶萱 合著 (2004) 「計算機概論」,全華科技圖書股份有限公司 ISBN 957-21-4554-1
(本書網頁)
Slides:
程式語言簡介 (9/22/2004); Read Chapters 1 and 2 (9/22/2004)
Overview of C (9/29/2004)
Top-Down Design with Functions (10/6 & 10/13)
Selection Structures (10/20 & 10/27)
Loop Statements (10/27 & 11/3)
Simple Data Types (11/3)
實習課:
9/23/2004: 熟悉C程式的編譯; 試 Figure 1.14的C程式
課堂上現打的程式
20041117_1.c (mean and standard deviation)
20041117_2.c (Selection sort)
20041124_1.c (Counters)
20041124_2.c (Factorial)
20041124_3.c (max in three numbers)
20041124_4.c (Finding max and min)
20041124_5.c (Fibonacci)
20041124_6.c (using malloc( ))
20041124_7.c (pointer operations vs. array operations)
20041201_1.c (separate files)
20041201_2.c (separate files)
20041201_3.c (2D arrays)
20041201_4.c (2D arrays)
20041201_5.c (2D arrays)
20041201_6.c (strings)
20041201_extra.c (classwork)
20041208_1.c (string using array)
20041208_1_variant.c (string using pointer)
20041208_2.c (fgets) 20041208_2.txt 20041208_2_out.txt
20041208_extra_problem.c (Lower case to upper case)
20041208_extra_solution.c (Lower case to upper case)
20041215_1.c (random numbers between 0 and RAND_MAX)
20041215_2.c (six random numbers between 1 and 49)
20041215_3.c (six different random numbers between 1 and 49)
20041215_4.c (Recursion; a*b; print to see its operation: 20041215_4_print.c)
20041215_extra.c (Recursion; a^b; see this version using only "+": 20041215_extra1.c)
20041222_1.c (string sorting; Cf. 20041117_2.c; Selection_sort.ppt)
20041222_2.c (Recursion; GCD; Cf. gcd.c)
20041222_3.c (Recursion; Factorial; Cf. 20041124_2.c)
20041222_4.c (Recursion; Fibonacci; Cf. 20041124_5.c)
20041229_1.c (Recursion; Towers of Hanoi)
20041229_2.c (Structures; typedef)
20041229_3.c (Structures; typedef, struct)
20041229_4.c (pointers)
20050105_1.c (Bad Swap; pointers)
20050105_2.c (Swap; pointers)
20050105_3.c (Swap; pointers)
20050105_4.c (Global variables)
Homework assignments:
Homework #1.
Write a program to convert a temperature in degrees Fahrenheit to degrees
Celsius.
(Please test your homework in Lab. class.)
10/7 TA will teach how to create your own homepage; Your homepage is due on
10/20.
(Please refer to 10/7/2004的投影片)
Homework #2. Due 10/28. See 10/14/2004的投影片 for more details.
Homework #3. Due 11/4. See 10/28/2004的投影片 for more details.
Homework #4. Due 11/18. See 11/04/2004的投影片 for more details.
Homework #5. Due 11/25. See 11/18/2004的投影片 for more details.
Two exams:
Midterm: 11/10/2004 (Chapters 2, 3, 4, 5, 7)
Final: 01/12/2005 (Chapters 8, 9, 10, 11 & pointers)
Project:
Term Project. Due 12/30. See 11/18/2004的投影片 & 11/25/2004的投影片 for more details.
Wanna recieve our course messages?
Mailing list group: http://groups.yahoo.com/group/programming-ntu/
Post message:
programming-ntu@yahoogroups.com
Subscribe:
programming-ntu-subscribe@yahoogroups.com
Unsubscribe:
programming-ntu-unsubscribe@yahoogroups.com
List owner:
programming-ntu-owner@yahoogroups.com
課程相關的連結 (Useful Links):
李家同教授C語言課程網站
計算機概論課程 (Introduction to Computer Science)
Wikipedia, the free
encyclopedia
Great Theoretical Ideas In Computer
Science