Advertisement

  • Topic 2: Syllabus for the 'C' Language Course.




























    1a) Historical introduction to the Language.

    b) Demonstration of a very simple program.

    c) Brief explanation of how the computer turns
    your program text into an executing program.

    d) The basic differences between 'C' and other languages.
    The advantages and disadvantages.

    We make the assumption that you are able to turn on your machine,
    use the Operating System at the Control Line Interpreter prompt
    "$ ", "c:>" or whatever, and to use an editor to enter program text.


    2 a) How the 'C' language arranges for the storage of data.
    An explanation of the keywords associated with data.
    The storage classes:- static auto volatile const.
    The variable types:- char int long float double
    The meaning of:- signed unsigned

    b) Introduction to the concept of pointers.

    c) Explanation of reading from the keyboard and writing to the screen.
    i.e. printf and scanf, the print formatted and scan formatted functions.

    d) The use of arguments to the main() function, argc argv env.

    e) A simple program to format text.


    3 Structures, arrays and pointers.

    a) Explanation of more coplex data structures.
    b) Programs which demonstrate uses of pointers.

    4 The operators of the language, arithmetic, pointer, logical, bitwise.

    a) Precedence.
    b) The unique bit and shifting operators.
    ( for a high level language )

    5 a) The Preprocesser.
    b) Header files

    What they are and what you put in them, both your own and
    those provided by the 'C' compiler vendor.

    A simple title which includes all sorts of things,
    both very useful and a number of traps.

    6 The library, why we have them and some of the more useful routines.

    a) How to read the book.
    b) The string functions as an example.

    7 a) Mistakes and how avoid making them.
    b) Debugging strategies.
    c) The assert macro.

    8 a) More on the representation of data vis. struct, typdef.

    b) Tables of all sorts.
    Arrays of structures.
    Pre-initialisation of data structures.
    ( Including jump or dispatch tables )
    The bit-field.

    c) Use of header files in this.


    9 a) The control structures of the language, what (not) to use and when.


    10 File IO

    This is an enormous subject and we we will
    really only just scratch on the surface.


    11 Lint, and more on errors / bugs and how to avoid them.


    12 The stack and a quick dip into assembler

    A study of the function calling mechanism used by most 'C'
    compilers and the effect on compiler output code of using
    the register storage class and the optimiser.

    13 The heap.

    The 'heap', it's management, malloc(), calloc() and free().


    14 Portability Issues.

    a) Defaults for storage sizes.
    b) 'endianism'. Yes, there are big-endian and little-endian computers!
    c) Functions which can be called with a variable number of arguments.


    15 Sample programs.

    Much is to be gained from examining public domain packages
    examining the code and reviewing the author's style.
    We will look at a number of functions and complete packages.
    in particular we will examine a number of sorting functions,
    a multi-threading technique, queues, lists, hashing, and trees.

0 comments:

Leave a Reply

Advertisement

Advertisement