CZ1102, Scientific Problem Solving and Computation
INSTRUCTOR: Dr Wang
Jian-Sheng
TUTORIAL TUTORS: Alice Heng/Wang Jian-Sheng
LECTURES: Monday/Thursday 2:00-3:00pm, at LT22.
TUTORIALS: Tutorial room is S16 06-34. First tutorial starts
in week 3, 3-8 Aug 98. Each group has a
particular time slot for tutorial. Tutorial and lab are run on alternating
weeks. First Lab at week 4, 10-15 Augst 98. The Lab opens from 9:00am
to 9:00pm.
EXAMINATION DATE: AM, 3 November 1998.
Final Exam Answers
LECTURE TRANSPARENCIES/Schedule
- Lecture 0 - CZ1102 briefing
- Lecture 1 - Introduction to problem solving, algorithms,
programming, computer languages
- Lecture 2 - Introduction to C, printf, scanf, while
- Lecutre 3 - Do-while, if, else if.
- Lecutre 4 -
More on if, files, character data type, integers, floating point
- Lecutre 5 -
Arithmetic operators (+,-,*,/,%), precedence,
relational (==, !=, >, >=, <, <=), logical (&&, ||, !) operators
- Lecutre 6 - For loop, comma operator, ++ and --.
- Lecutre 7 - Break, continue
- Lecutre 8 - Switch, goto statements,
- Lecutre 9 - cast, sizeof, bitwise operators (&, |, !, <<, >>)
- Lecutre 10 - Functions, argument passing, return
- Lecutre 11 - Preprocessor, #include, #define, #ifdef
- Lecutre 12 - Recursion
- Lecutre 13 - Array, string
- Midterm Examination (on Monday 14 Sep 98)
- Lecutre 14 - Multidimensional array
- Lecutre 15 - Pointers
- Lecutre 16 - More on pointers
- Lecutre 17 - Storage classe
- Lecutre 18 - File, input/output
- Lecutre 19 - Structure, typedef (a 20min QUIZ, about three
tutorial-like questions)
- Lecutre 20 - Union, bit fields, dynamical memory allocation
- Lecutre 21 - Linked lists
- Lecutre 22 - Looking toward C++
- Lecutre 23 - Review
ASSIGNMENTS: Page/Exercise numbers
will be announced here and in class. You need the textbook for
the actual questions.
- Toturial 1, 3-8 Aug 98, page 16-17, exercise 2, 14.
page 41-42, exercise 2, 4, 6.
page 54-55, exercise 2, 4, 6.
page 60-61, exercise 2, 4.
- Lab 1, Due Monday, 17 Aug 98, page 67-68, Programming Exercises,
2.3, 2.5, 2.9; page 111, Programming Exercise 3.1.
- Tutorial 2, 17-22 Aug 98, page 77-78, exercise 6, 8, 10.
page 88, exercise 2, 4, 6, 8, 10, 12.
page 95, exercise 2.
page 102, exercise 2, 4.
page 106, exercise 6.
- Lab 2, Due Monday, 31 Aug 98, page 111, Programming Exercises,
3.4 and 3.5; page 151, Programming Exercise 4.1 and 4.4.
- Tutorial 3, 31 Aug - 5 Sep 98,
page 118, exercise 4.
page 127, exercise 2, 4.
page 143, exercise 4.
page 149, exercise 4, 8.
page 164, exercise 4, 14, 16.
page 190, exercise 6, 10, 12.
- Lab 3, Due Tuesday, 22 Sep 98, page 224-227, Programming Exercises,
5.2, 5.10, 5.20, 5.21.
- Tutorial 4, 21 Sep - 26 Sep 98,
page 205, exercise 4.
page 238, exercise 2, 4, 14, 24.
page 249, exercise 2, 6.
page 253, exercise 2.
page 262, exercise 2, 4, 6.
page 271, exercise 6.
- Lab 4, Due Tuesday, 6 Oct 98, page 297-298, Programming Exercises,
6.6, 6.11; page 383-387, Programming Exercises, 7.5, 7.19.
- Tutorial 5, 5 - 10 Oct 98,
page 315, exercise 2, 4.
page 320, exercise 4, 6.
page 337, exercise 2, 4, 8, 10, 18.
page 350, exercise 6.
- Lab 5, Due Tuesday, 20 Oct 98, page 434, Programming Exercise
8.5, page 485, Programming Exercise 9.7,
page 545, Programming Exercise 10.3.
- Tutorial 6, 20 - 24 Oct 98,
page 358, exercise 8.
page 396, exercise 4, 6.
page 405, exercise 2, 4, 6.
page 444, exercise 4.
page 464, exercise 6.
page 496, exercise 2, 4, 22.
WORKLOAD: It is recommended that you spend 8 hours per week on this
module. The 8 hours include 2 hrs of lectures, 1 to 2 hrs of lab or
tutorial, 4 hours of reading and homeworking.
SOFTWARE: Vi editor and GNU C compiler on Windows. If you have a PC,
we recommend highly to use them.
Website of
the textbook