C for Experienced Programmers

Contact Us for Dates
5 days practical workshop for up to 12 people.

Contact us for Onsite Price

This course is designed as a conversion course for students who have considerable experience in programming in other high-level languages, and who need to start writing or maintaining professional code in C.ANSI Standard C is a general-purpose programming language that is widely used in areas as diverse as operating systems and games. This course will teach you how to write professional ANSI Standard C code, and how to use the functionality provided by the ANSI Standard C library. The course explores concepts and syntax through lectures, discussion and hands-on lab exercises.

Training Course Objectives

  • How to program in ANSI Standard C
  • How to use the Standard C Library
  • Good coding practice and idioms for the safe and sensible use of language features

Who it is for

This training course is for experienced programmers who need to be able to develop advanced applications using the C programming language.

Training Course Prerequisites

  • Delegates should have considerable practical experience of programming in a modern high-level language.

Chapters

Chapter 1 Language Overview

  • Data types, variables and operators
  • Control flow
  • Functions
  • Arrays
  • Pointers
  • Strings
  • User-defined types
  • I/O
  • The preprocessor

Chapter 2 Pointers and Arrays

  • Pointer arithmetic
  • void pointers
  • Idiomatic use of pointers
  • Pointers-to-pointers
  • Arrays and pointers
  • Strings and pointers
  • Passing arrays to functions
  • Dynamic memory allocation
  • Use of malloc and free
  • Command-line arguments

Chapter 3 Custom types

  • Using typedef with structs
  • Pointers and structs
  • Self-referential structs
  • Bitfields
  • Unions

Chapter 4 I/O

  • Opening files
  • Reading and writing files
  • Binary and text files
  • Random access I/O
  • Directory operations

Chapter 5 The Standard Library

  • What is in the library
  • String manipulation using the str functions
  • Math functions
  • Date and time functions
  • Other Standard C functions
  • Writing variadic functions
  • Non-local goto

Chapter 6 Program organization

  • Program layout (text / data / stack / heap)
  • Storage classes - auto, register, extern and static
  • Linkage - internal, external and none
  • Qualifiers - volatile and const
  • Atomic operations
  • Alignment
  • Sequence points

Chapter 7 The Preprocessor

  • The null directive
  • Proper use of header files
  • Minimizing recompilation
  • Conditional inclusion guards, #define and #undef
  • Using macros properly
  • Stringifying and token pasting
  • Predefined symbols
  • Other directives (#line, #pragma, #error)

Chapter 8 Error handling and status reporting

  • Using assert()
  • errno
  • perror()
  • Returning values from programs

Chapter 9 Function pointers

  • Declaring and using function pointers
  • Using lookup tables

Chapter 10 Implementing data structures

  • Linked lists
  • Queues
  • Stacks
  • Hashing
  • Using recursive functions
  • Binary Trees
  • Sorting