學年學期 Academic Year / Semester | 099學年度第2學期 | Spring Semester, 2011 | ||||
開課單位 Course Department | 資科一 | Freshman Class of Department of Computer Science | ||||
課程名稱 Course Name | (中 Ch.)計算機程式設計(二) | (英 Eng.)Computer Programming (II) | ||||
授課教師 Instructor | 蔡銘峰 | TSAI MING-FENG | ||||
職稱 Title | 專任助理教授 | Assistant Professor | ||||
學分數 No. of Credits | 3.0 | |||||
修別 Type of Credit | 必修 | Required | ||||
先修科目 Prerequisite(s) | ||||||
點閱核心能力分析圖與授課方式比例圖 |
This course is designed to provide a substantial exposure to the C programming language in a Unix environment for students with basic programming experience.
The content of the course includes the following topics:
o Part I – Advanced Features of C
• Pointer and Arrays
• C Preprocessor
• Bitwise Operations
• File Input/Output
• Debugging and Optimization
• Advanced Pointers
• Modular Programming
• Portability Problem
o Part II – Advanced Unix Tools
• Unix Basics: essential commands, pipes, redirections
• Effective Programming: emacs/vi, svn/git, make, gdb
• Useful Tools: grep, sed, diff, xargs, find, …
• Scripting: Bash, Perl/Python
o Part III: Simple Data Structure and Algorithms
• Queue, Stack, Linked List
• Searching, Sorting
Week Topics
1 Course Introduction; World of Programming; Unix Basics; Pipe and redirection;
2 Utilities for Development, Debugging, and Optimization: editors – emacs/vi; gcc; make and makefiles; gdb/cgdb; valgrind – memory error checker; gprof – code profiler
3 Process Control: suspend, resume, kill, foreground, and background (ps, ^Z, jobs, kill, bg, fg, &); C Revisited
4 Pointer, Array, and Strings: pointer arithmetic and arrays, C string library, string manipulation
5 C Preprocessor: #define, conditional compilation, parameterized macros; Advanced Pointers (1)
6 Advanced Pointers (2): malloc, calloc, realloc, and free; memory leaks and garbage collection, dynamic arrays
7 Abstract Data Types: structures, unions, typedef, enum, casting; Basic Data Structure (1): Stack and Queue
8 Basic Data Structure (2): Linked List, Ordered Linked Lists, Double-Linked Lists, Tree
9 Midterm
10 Bitwise Operations: shift and exclusive or, inclusive or, xor encryption, testing bits
11 Module Programming: modules, public and private, extern modifier, headers, makefile for multiple files
12 Portability Problem: modularity, word size, byte order problem, alignment problem, null pointer problem
13 Basic Algorithm: searching and sorting
14 Problem Solving (1)
15 Problem Solving (2)
16 Problem Solving (3)
17 Scripting – Bash; Perl: regular expression, string processing; Scripting – Python: functional programming
18 Final Exam
The course will involve lectures by instructor, lab exercises, and programming assignments on various topics. Students are expected to participate the exercises, and write the assignments on their own. There will be a midterm conducted as a written test, and a final exam including written and programming tests.
教材與教學準備、實驗或實習輔助、作業諮詢與批改
o Midterm: 20%
o Final Exam: 40%
o Labs & Assignments: 40%
o Bonus (participation): < 5%
o The C programming Language (2nd Edition), K&R.
o Advanced C, Peter D. Hipson.
o C Unleashed, Richard Heathfield et al.
o Unix Unbounded a beginning approach, AMIR Afzal.