C Language Programming

C Language Programming


All developers with knowledge of a computer system who wish to write C programs will benefit from attending this course.


Familiarity with Windows is essential and some programming experience in another language would be helpful. Attending our one-day Programming for Beginners course would give the ideal level of knowledge.


4 days. Hands on.

Course Objectives

This course provides a good working knowledge of the C Programming Language. Giving students hands on experience with writing C Programs.

The course develops good C Programming style and improved programming techniques, which can then be applied to other programming languages in the future.

Course Content

Elements of a C program
C keywords.
Statement Blocks.
Function Blocks.

Writing, Compiling and Linking a C Program
Comments on C.
Header Files.
The main ( ) function.
Command line arguments (argv and argc).
The printf ( ) function.

The Standard C Library

Recommended C Programming Style

C Data Types
Elementary Data Types; char, int, float, double.
Defining Variables in C.
Elementary Operators.

Addresses vs. Contents of Variables; lvalue and rvalue.
Using printf ( ).
Data Type Modifiers; unsigned, signed, long, short.

Operators and Selection Statements
More arithmetic operators.
Relational operators.
Bitwise operators.
Shorthand form of operators.
If statements.
Logical operators.
The switch statement.
The break keyword.
Precedence of operators.

The goto statement and labels.
While loops.
Do . . . while loops.
For loops.
Infinite loops with break.
The continue statement.

Function Prototyping
Prototyping in C.
Definition vs. Declaration.
Types of prototype.
No arguments.
Variable arguments.
Fixed number of arguments.

Storage Classes and Scope
Local scope.
Global scope.
Static variables.
External variables.
Register variables.
Initialisation of variables.

Introduction to Pointers
Defining a pointer variable.
The asterisk.

The Concept of Indirection
Using a pointer in an assignment.
Rules for pointers.
Pointers and Arrays.
Arrays of char.
Null pointers.
Incrementing and decrementing pointers.
Pointers as arguments to functions.

More Advanced Techniques with Pointers
Using equality and relational operators with pointers.
Pointer arithmetic.
Multi-dimensional arrays.
Using arrays of pointers.
Allocating memory at run time.
calloc the cast operator.
Pointers to functions.
Right-left rule for complex data types.

Structures, Unions and Other Data Types
Enum data type.
The cast operator (revisited).
Bit fields.

Disk File Operations
Opening and closing a file.
Reading and writing a file.
Reading and writing binary files.
File positioning.
The C Preprocessor.
Macro substitution using.
# define, #undef.
Using parameters in Macros.
#if, #ifdef, #endif.

Virtual Courses

ALL of our courses can be delivered virtually. And our Bath public schedule of courses are now available as live virtual sessions, using the popular Zoom Virtual Classroom and remote labs. Delegates can test their access at: www.zoom.us/test

Public Courses

On-Site Courses

Can't attend one of our public classes? Booking for multiple people?

All our courses are available on your site! Delivered for your staff, at your premises.

Contact us to find out more...