Home Feedback Search Contents




C Programming

Course Description

This course teaches you how to work with the C compiler and the C preprocessor and to identify their advantages and faults. The C programming language has become, in recent years, the standard language for software development in advanced computer environments. The use of the C programming language for software development holds many programming possibilities that one must learn to utilize and demands dealing with the difficulties it rises. Thus the student can deal with real problems upon completing the course. The material is based on real computing problems, which will enrich and deepen the students experience in developing large and complex systems with the C Language. At the end of the course the students are able to develop software in C at a level equal to that of C programmers.

This course uses many examples to explain the theoretical material and also includes many suggestions for practical use of the material.

Course Objective

The objective of this course is to prepare attendees to fully contribute to the coding and implementation of an software system written in C. Upon completion of this course attendees will be able to:

Write C programs using correct syntax and semantics.
Choose the appropriate C language feature to match a given design objective.
Learn the pros and cons of the various programming structures that the C language uses.


This course is primarily directed toward designers, programmers, and testers. In addition, analysts would benefit from this material.


A working knowledge of a programming language is required. Some familiarity with data structures and operating systems is preferable.

Course Duration

C Programming is a five day course.

Course Outline

I. Getting Started

1.1) Language characteristics

1.2) Program structure

1.3) Stages of program development

II. Variables

2.1) Representation of numbers in memory

2.2) Variables: definition and usage

2.3) Types of variables

2.4) Conversions (implicit and explicit)

2.5) Interactive I/O

2.6) typedef

2.7) Overflow

III. Operators and operators

3.1) Expressions

3.2) Assignment operator

3.3) Arithmetic operators

3.4) Increment and Decrement operators

3.5) Size of operator

3.6) Relational operators ( < == != etc.)

3.7) Logical operators (&& || !)

3.8) Precedence table of operators

IV. Standard Library

4.1) Why Library? Header files

4.2) Short survey of math.h

4.3) stdio.h: getchar() & putchar()

4.4) stdlib.h

V. Control Flow

5.1) While loop

5.2) For loop

5.3) Comma operator

5.4) Do .. while loop

5.5) break and continue statements

5.6) if statement

5.7) conditional (ternary) operator

5.8) switch statement

VI. Arrays

6.1) One dimensional arrays

6.2) Multidimensional arrays

VII. Strings

7.1) "String" in C. Initialization. Input/Output

7.2) Library Functions manipulating strings

7.3) Physical length versus logical length

VIII. Functions

8.1) Functions declaration and function definition

8.2) Functions without parameters and returning no value

8.3) Functions with parameter(s) and returning no value

8.4) Functions returning a value

8.5) Passing information to functions: Call by value vs. Call by reference

8.6) Scope and visibility. Global and local variables

8.7) Storage classes: auto vs. static

8.8) extern and static in multiple file programs

IX. Pointers

9.1) Why pointers? What are they?

9.2) Pointer Semantics

9.3) Definition of Operators * and &

9.4) Pointer pitfalls

9.5) Pointer arithmetic

9.6) Arrays and pointers

9.7) Pointers and functions parameters

X. Dynamic Memory Allocation

10.1) Introduction to dynamic memory allocation

10.2) The functions malloc(), calloc(), & free()

10.3) Arrays of pointers, and dynamic allocation

XI. Structures

11.1) The concept of a structure

11.2) Reference of structure's elements

11.3) Defining structures (tags, through typedef)

11.4) Array of structures

11.5) Initialization of array of structures

11.6) Nested structures

XII. Bit-fields, Unions, Bitwise Manipulation

12.1) Bit-fields: Definition and usage

12.2) Unions: definition and usage

12.3) Bitwise Manipulation

XIII. Preprocessor

13.1) #include directives

13.2) Defining symbolic constants through #define

13.3) #undef

13.4) Predefined names (__FILE__, __TIME__, __DATE__, __LINE__)

13.5) Macros with parameters

13.6) Functions versus macros

13.7) Standard library macros

13.8) A survey of conditional compilation

XIV. Working with Files

14.1) File support overview

14.2) ASCII file versus BINARY file

14.3) I/O library and general ways to work with files (FILE, fopen(), fclose(), feof())

14.4) ASCII files (fgets(), fputs(), fgetc(), fputc(), fprintf(), fscanf())

14.5) BINARY files (fread(), fwrite())

14.6) Positioning within a file (fseek(), rewind(), ftell())


Copyright © 2014 Korson-McGregor.  All rights reserved.