Site Sections => About Us | Consultancy | Training | Software | Publications | Open Source | Support | Open Standards | FAQ | Jobs
Site Style Info

Introduction to C - A 5-day Course

Synopsis

This is an intensive introduction to ANSI C programming using the GNU C compiler. At the end of the course attendees should be reasonably confident in reading and writing C programs and have a good practical understanding of advanced topics such as the use of C pointers, the relationship between pointers and arrays, as well as dynamic memory allocation and memory management. In addition, they will be able to understand makefiles and version control using RCS and CVS.

Throughout, the course will emphasise a disciplined and structured approach to C programming. Debugging and code testing techniques will also be covered extensively, including the use of the GNU debugging tools. The course is not based on any particular Integrated Development Environment (IDE), and adopts a more traditional approach where files are created using a suitable editor (such as EMACS) and programs are compiled either by issuing commands at the commandline, or by invoking make on an appropriate makefile.

Suitable for

Attendees are expected to have some programming experience - e.g. Basic, Fortran or Pascal. The course is also suitable for recent engineering and computer science graduates who need to "cure" any bad (programming) habits they might have picked up at University.

Prerequisites

Drive and determination are important pre-requisites - the course aims to produce competent working programmers, as is a good sense of humour (vital when working under pressure). Good programmers think hard, but also have a strong obsessive streak .... a need to get a program fully debugged and working at all costs.

Key Skills

  • Master the GNU C compiler
  • Learn both the syntax and usage of C
  • Enter the exotic world of dynamic data structures and algorithms
  • Be able to save data to files and read data from files
  • Understand the intricacies of makefiles and make
  • Appreciate the need for version control and be able to work with RCS and CVS
  • Master the techniques for writing well structured modular code in C
  • Know how to usd the GNU debugger

Delivery

This is instructor-led C training. Each section of the material covered by the tutor is followed by hands-on practical exercises for which worked examples of the solutions are typically provided.

The course also includes numerous mini-challenges and code examples for private study, and to build on the skills acquired during the course.

  • Compiling a simple C program
  • Compiling an application containing several C modules (.c files)
  • Creating data structures and applications that use them
  • Traversing and processing information in one dimensional and multi-dimensional arrays
  • Finding your way round the GNU documentation and help manuals
  • Reading and writing text and binary files
  • Creating and using indexed data structures

Scheduled and On-site Courses

Courses in this subject are scheduled on an 'ad-hoc' basis. We can arrange a course at our Carshalton centre or on customer site for any client wishing to send two or more delegates on the same course.

For courses at the Carshalton Centre the fee will be:

  • £3500 + VAT for the first two delegates
  • £1650 + VAT for the third delegate
  • £1200 + VAT for the fourth delegate
  • £400 + VAT for each additional delegate to a maximum of eight

On-site course fees are as above + expenses recharged at cost.

For a 1:1 course in Carshalton the fee is £2750 + VAT. For a 1:1 on-site course the fee is £2750 + VAT + expenses recharged at cost.

If there are any dates showing below this line, a course has been scheduled and places for individuals are available at £1750. Otherwise, no courses are currently scheduled and the above fees apply.


Contents

First steps

  • How C became
  • Getting to know the GNU C compiler
  • The basic anatomy of a C program

Data types, operators and expressions (the basics)

  • Base data types and their sizes
  • Constants and declarations
  • Variable names
  • Arithemetic operators
  • Relational and logical operators
  • Increment and decrement operators
  • Increment and decrement operators
  • Assignment operators
  • Expressions
  • Operator precedence
  • Casting and type conversion

Program flow control

  • if - else
  • switch
  • while , do-while and for-loops
  • Statements and blocks

Functions

  • Functions and function prototypes
  • Returning values from functions
  • External variables and scope rules
  • Static variables
  • call by value and recursion

Pointers and arrays

  • Pointers and addresses
  • Pointers as arguments to functions
  • Arrays
  • The relationship of pointers and arrays
  • Pointer arithmetic
  • How C deals with multi-dimensional arrays
  • Arrays of pointers - their uses and initialisation
  • Strings and string functions

Structures

  • Fundamentals of structures
  • Passing structures as arguments to functions
  • Returning structures as return values from functions
  • Arrays of structures
  • Pointers to structures
  • Using pointers to structures to pass values to a function and return values from a function
  • Typedef and its uses in developing well structured and maintainable code

An introduction to data structures and algorithms

  • Sorting arrays of records
  • Allocating and freeing memory (malloc and free)
  • Linked lists and queues
  • Indexing (table lookup, binary trees, hashing)

Input-output

  • Standard input and standard output
  • Formatted output - printf
  • Formatted input - scanf
  • The dangers of scanf
  • File access and file I/O
  • An overview of input-output in a windowing environment

Further topics

  • The MACRO pre-processor and how to use it wisely
  • Unions
  • Bit fields
  • Date and Time functions in the C Standard Library
  • Diagnostics- the assert macro

Makefiles, Libraries, RCS and CVS

  • Simple make files
  • MACROS in make files
  • Use of dummy targets
  • Recursive makefiles
  • Building and using libraries
  • The importance of version control
  • RCS and CVS

C training UK prices

For publicly scheduled training (individual places), see our UK training schedule.

In-house training for company groups is charged at a daily rate per group — see our In-House UK Training Guidelines.

Publicly Scheduled Training Locations

We currently run public training courses in the following locations:

  • London, UK
  • Leeds, West Yorkshire, UK
  • Birmingham, West Midlands, UK
  • Carshalton, Surrey, UK
  • Chester, North West, UK
  • Coventry, West Midlands, UK
  • Edinburgh, Scotland, UK
  • Glasgow, Scotland, UK
  • Harwell, Oxfordshire, UK
  • Manchester, North West, UK
  • Milton Keynes, Buckinghamshire, UK
  • Newark, Nottinghamshire, UK
  • Reading, Berkshire, UK
  • Slough, Berkshire, UK
  • Stevenage, Hertfordshire, UK
  • Wakefield, West Yorkshire, UK
  • Wokingham, Berkshire, UK

Most UK public training courses are available on a monthly basis.

Please see the individual course outlines or our public training schedule for details.

In-house (on-site) training locations

We deliver in-house courses at client premises and/or training facilities in any part of the world which is practically and commercially accessible.

Our In-house training guidelines outline our basic requirements and our UK pricing structure. To estimate costs for training in other countries, simply convert to your local currency and then make a rough calculation of our tutor's costs for travelling to and staying at your location.


West Yorkshire Office

GBdirect Ltd
Training Division
Bradford Design Exchange
34 Peckover Street
BRADFORD
BD1 5BD
West Yorkshire
United Kingdom

training@gbdirect.co.uk

Training: 0800 651 0338
General: +44 (0)870 200 7273
Finance: +44 (0)1353 615 174

Please call between 0900 and 1700 (UK time) on Monday to Friday


South East Regional Office

GBdirect Ltd
Training Division
18 Lynn Rd
ELY
CB6 1DA
Cambridgeshire
United Kingdom

training@gbdirect.co.uk

Training: 0800 651 0338
General: +44 (0)870 200 7273
Finance: +44 (0)1353 615 174

Please call between 0900 and 1700 (UK time) on Monday to Friday


Please note:
Non-training enquiries should be directed, initially, to our UK national office in Bradford (West Yorkshire), even if the enquiry concerns services delivered in London or South/East England. Clients in London and the South East will typically be handled by staff working in the London or Cambridge areas.