Schedule and resources for 2009:
|
Lectures:
|
The links below point to the materials presented during the 2-hour lecture slots.
These materials do not define the whole unit.
Indeed, 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.
Further details of the expectations of you can be found in the working effectively in CITS1210 document.
|
|
Tutorials:
|
Tutorials reiterate the material introduced in the lectures and are aimed as review exercises for students who need extra assistance in understanding unit material.
There are eight tutorials, scheduled at different key points in the unit.
The schedule and links to tutorial questions are given below.
Sample solutions will not be provided for tutorial questions.
|
|
Laboratories:
|
Labsheets provide practical exercises that reinforce the concepts introduced in the lectures.
The completion of these tasks are considered essential in order to make satisfactory progress in the unit.
Links to the weekly labsheets are given below and sample solutions will appear on this page in due course.
Successful completion of labsheets will require preparation and effort outside of your allocated laboratory session.
For for more information, read the document: laboratory sessions in CITS1210.
|
|
Projects:
|
1st project, released Monday 24 August, due 4pm Friday 4 September.
2nd project, released Monday 5 October, due 4pm Friday 23 October.
|
|
Examinations:
|
Mid-semester test, held during the lecture on Tuesday 15 September.
Final examination, held during the November examination period.
|
|
Week 1
|
Lecture 1, Tuesday 21 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
|
|
|
Week 2
|
Lecture 2, Tuesday 28 July 
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: An Introduction To C
and some sample solutions
|
|
Week 3
|
Lecture 3, Tuesday 4 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
|
Tutorial 1: Repetition
Labsheet 2: Repetition and Control Flow
and some sample solutions
|
|
Week 4
|
Lecture 4, Tuesday 11 August 
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
|
Tutorial 2: Arrays
Labsheet 3: Functions and 1-dimensional Arrays
and some sample solutions.
|
|
Week 5
|
Lecture 5, Tuesday 18 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
|
Tutorial 3: Reading From Files
Labsheet 4: Reading From Text Files
and some sample solutions.
|
|
Week 6
|
Lecture 6, Tuesday 25 August 
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.
Textbook: sections 8.7-8.8, 12.1-12.3
|
Tutorial 4: Output, Static Variables, and Structures
1st project, worth 15%, released Monday 24 August, due 4pm Friday 4 September
|
|
Week 7
|
Lecture 7, Tuesday 1 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.
Textbook: sections K.1-K.2
Make documentation: sections 1-2, 6.1-6.6
|
|
Non-teaching week
|
|
Week 8
|
Mid-semester test & Lecture 8, Tuesday 15 September 
In the 1-hour lecture that follows the mid-semester test, 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
|
|
|
Week 9
|
Lecture 9, Tuesday 22 September 
Passing pointers to functions, allocating new memory for basic data types, arrays, and user-defined types, deallocating dynamic memory, and sorting arrays of any type using the function qsort.
Textbook: sections 10.4-10.5
|
Tutorial 5: Pointers and Dynamic Memory
Labsheet 5: Introducing make and Pointers
and some sample solutions.
|
|
Week 10
|
Lecture 10, Tuesday 29 September 
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
|
Tutorial 6: The File System
Labsheet 6: Pass-by-Reference and Pointers
and some sample solutions.
|
|
Week 11
|
Lecture 11, Tuesday 6 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 7: Self-Referential Data Structures
2nd project, worth 25%, released Monday 5 October, due 4pm Friday 23 October
Week 12 review tutorial
|
|
Week 12
|
Lecture 12, Tuesday 13 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 in week 13
|
Some online tutorials and reference documents on C:
-
C Programming Notes, by Steve Summit (Experimental College, University of Washington)
-
The C Standard Library.
-
A Tutorial on Pointers and Arrays in C by Ted Jensen.
-
The Wikipedia entry for the C programming language.
-
The USENET discussion
Why is C good???.
-
The Development of the C Language, an historical reflection by Dennis Richie, one of the original authors of the C programming language.
-
WG14 N1256 (PDF, 540 pages)
The latest publicly available version of the standard is the combined C99+Technical Corrigendums 1, 2, & 3, dated 2007-09-08.
This is a WG14 working paper, but it reflects the consolidated standard at the time of issue.
-
C99RationaleV5.10 (PDF, 224 pages)
The rationale for the C99 standard.
Moving from Java to C?
The following web pages may be useful for those programmers who have previously used Java.
Editing C and text files with vi/vim/gvim:
Some vi tutorials you may find useful include:
Other documentation:
-
GNU make
This document presents considerably more information on make than is required for this unit.
There are also complete books on make, but it is not recommended that you purchase such a book just for this unit.
-
A list of POSIX Library Functions
To obtain further details about any function listed here, type man functionname on the CSSE laboratory computers.
|