Schedule and resources for 2008:
All materials required for laboratory sessions may be found in the local
directory /cslinux/examples/CITS1210/.
Additional materials will be added here as the unit progresses.
| Lectures: |
The links below point to the materials presented during our 2-hour
lecture slots.
These materials do not define the whole unit.
Attending lectures and reviewing their material
comprises about ⅓ of the effort required for this unit.
The remainder of your time should be spent reading a C textbook,
possibly an online tutorial,
and attempting the laboratory tasks.
Please read
Working effectively in CITS1210.
|
| Laboratories: |
BEFORE commencing Labsheet-1, ensure that you have fully read:
On the labsheets, we're using the following indicators of difficulty:
- Introductory tasks,
set for beginners to all forms of programming.
If beginning students can complete all of the introductory
tasks each week, they will be keeping up with
the requirements of the unit.
- More advanced tasks,
identified by one or more chilis,
set for students who have previously programmed in another
programming language (probably Java or Visual Basic).
More advanced students should aim to complete all introductory
and all advanced tasks each week.
|
|
Mid-semester test: |
held during the lecture, on Thursday 25th September.
|
| Projects: |
1st project
handed out Thursday 28th Aug,
due 12noon Friday 12th September.
2nd project
handed out Thursday 9th October,
due 12noon Friday 31st October.
|
| Week 1 |
Lecture-1,
Thursday 31st July
An introduction the ISO-C99 programming language,
motivating the need to follow programming language standards,
recognition that C is a general purpose, but not perfect language,
and an introduction the gcc C compiler.
Textbook: sections 1.3-1.4
|
No labsheet or tutorial this week |
| Week 2 |
Lecture-2,
Thursday 7th August
The structure of C programs,
the naming of variables,
basic datatypes,
flow of control in a C programs,
conditional execution, and bounded and unbounded loops.
Textbook: sections 2.1-2.6, 5.1-5.3, 6.1-6.7
|
Labsheet-1
and some sample solutions.
|
| Week 3 |
Lecture-3,
Thursday 14th August
An introduction to functions,
the datatype and return value of a function,
function parameters and passing arguments,
1-dimensional arrays (vectors),
how arrays may be initialized,
and how C uses character arrays to support character strings.
Textbook: sections 4.1-4.6, 8.1-8.4, 11.1-11.2
|
Labsheet-2
and some sample solutions.
Tutorial-1
|
| Week 4 |
Lecture-4,
Thursday 21st August
(handout )
In which we use the wordsquare puzzle to
introduce a number of new concepts, including:
opening and closing text files,
reading a text file line-by-line,
and writing short functions to modify and check the
characteristics of strings passed as arguments.
Textbook: sections 7.1-7.3, 11.3-11.5
|
Labsheet-3
and some sample solutions.
Tutorial-2
|
| Week 5 |
Lecture-5,
Thursday 28th August
New uses for the C preprocessor,
pre- and post- incrementing and decrementing,
shorthand arithmetic,
writing output to files and to character strings,
the importance of a program's exit status, and
the role of static variables.
Textbook: sections G.1-G.3, 3.3, 7.4
Extra material on enumerated types and structures - see Lecture 06.
|
Labsheet-4
Tutorial-3
|
| Week 6 |
Lecture-6,
Thursday 4th September
(handout )
In which we use a considerably simplified version of chess
to introduce the new concepts of
using enumerated types to represent sequences of distinct values,
structures to hold collections of strongly related data,
2-dimensional arrays,
and user-defined types to name and represent our data our way.
Textbook: sections 8.7-8.8, 12.1-12.3
|
Tutorial-4
1st project,
contributing 15%,
handed out Thursday 28th Aug,
due 12noon Friday 12th September.
No tutorial in week 7.
|
| Week 7 |
Lecture-7,
Thursday 11th September
The detailed role of gcc in compilation and linking,
the development of a small project in multiple files,
the difference between declarations and definitions,
the use of make to compile projects involving multiple files,
and the construction of our own libraries.
Make documentation:
sections 1-2, 6.1-6.6;
Textbook: sections K.1-K.2
|
|
Non-teaching week |
| Week 8 |
Lecture-8,
Thursday 25th September
Mid-semester test
In the following 1-hour lecture we undertake
a slow introduction to pointers,
the "address-of" operator,
pointer dereferencing,
the relationship between arrays and pointers,
pointer arithmetic,
functions with pointer parameters,
and
functions returning pointer values.
Textbook: sections 10.1-10.3
|
No labsheet or tutorial this week |
| Week 9 |
Lecture-9,
Thursday 2nd October
Passing pointers to functions,
allocating new memory for basic data types,
arrays, and user-defined types,
deallocating dynamic memory no longer required,
and sorting arrays of any type using the function qsort.
Textbook: sections 10.4-10.5
|
Labsheet-5
and some sample solutions.
|
| Week 10 |
Lecture-10,
Thursday 9th October
Processing standard command-line arguments and command switches,
the getopt functions,
how to report operating system-specific errors consistently,
and how to read the contents of a directory and to investigate
directory contents.
Textbook: sections H.1-H.2
|
Labsheet-6
Tutorial-5
|
| Week 11 |
Lecture-11,
Thursday 16th October
The motivation for dynamic data structures,
characterized dynamic data structures,
three simple structures -
stacks, lists, and queues,
and code for basic operations on them -
their allocation and initialization,
adding items to them,
their traversal,
removing items from them,
and deallocating their items and the whole structure.
Textbook: sections 15.1-15.4
|
Tutorial-6
2nd project,
contributing 25%,
handed out Thursday 9th October,
due 12noon Friday 31st October.
Tutorial-7
Review tutorial in week-13
|
| Week 12 |
Lecture-12,
Thursday 23rd October
How integer data is stored and represented,
the bitwise operators of C99,
how to store multiple items in integers and how to extract them,
and how to read and write files of binary data.
Textbook: sections D.1-D.2, 13.1-13.3, 14.1-14.4
|
| Week 13 |
No lecture |
Some online tutorials and reference documents on C
|