C Programming

Current Version: 02-0301-0501
Summary
This course provides programmers with a hands-on introduction to the C programming language. The course teaches both syntax and semantics of the C language. It also includes advice on good programming practices.

Prerequisites
Participants should be familiar with one or more programming languages or have attended an Introduction to Programming course. This course is not suitable for people without programming experience.

Course Objectives
On completion of this course, the student should be able to
  • Use the syntax, semantics, and scoping of ANSI C
  • Write ANSI C programs using many features of the language
  • Use some of the ANSI C libraries
  • Describe the C compilation process
  • Write programs using dynamic data structures and recursion
  • Recognize the advantages of multi-file programs
Length
5 Days

Format
Instructor-led course, with practical computer-based exercises.

Course Outline
  • An Introduction to C
    • An Example
    • The Compilation Process
    • White Space and Comments
    • Functions
    • Constant Strings
    • Libraries
    • printf()
    • Simple Statements
    • Compound Statements
    • Fundamental Types
    • Defining Variables
    • Identifiers
    • Operators
      • Operators vs. Expressions
    • The if Statement
    • The while Statement
    • The for Statement
    • Character Handling
    • The Preprocessor
    • Standard Input/Output Library
    • getchar() and putchar()
  • Data Types and Constants
    • Data Types
      • Numeric and Character Types
      • Sizes of Data Types
      • Constant and Volatile Objects
    • Constants
      • Integer Constants
      • Floating-point Constants
      • Character Constants
  • Functions
    • What is a Function?
    • Function Prototypes
    • The exit function
    • Function Parameters
    • Call By Value
    • Return Values
    • The void Type
    • Writing Functions in Pre-ANSI C
  • Declarations
    • Declaring Variables
    • Scope
      • Internal Variables
      • Parameters to Functions
      • External Variables
      • Masking
      • Scope of Functions
    • Extent
      • Extent of Externals
      • Automatic Variables
      • Internal Static Variables
      • Internal Static Variables – Example
    • Initialization
  • Recursion
    • What is Recursion?
    • Why Recursion? (What does it all mean?)
    • Example
  • Evaluating Expressions
    • Truth Values
      • Precedence
      • Associativity
      • Table of Operators
    • Operand Evaluation
      • Compile-Time vs. Run-Time Precedence
  • More Operators
    • Boolean Operators
      • Order of Evaluation
    • The Comma Operator
    • The Conditional Operator
  • Assignment
    • The Simple Assignment Operator
    • Compound Assignment Operators
    • Use of Assignment in Expressions
  • Further Flow Control
    • The do-while Loop
    • The Null Statement
      • A Caution About do...while()
    • Continue
    • Break
    • Goto
    • Switch
  • Pointers
    • Pointer Concepts
    • Defining Pointers
    • Pointer Operators
    • Pointers As Function Parameters
    • Pointers As Return Values
  • Pointers
    • Defining Arrays
    • Using Arrays
    • Initializing Arrays
    • Multidimensional Arrays
    • Strings
      • Processing Strings
    • Arrays and Pointers
    • Arrays as Function Parameters
    • String Handling
    • Library Function: gets()
    • Some Library String Functions
    • Pointers to Constants
  • Pointers Revisited
    • Pointer Arithmetic
    • Incrementing And Decrementing Pointers
    • String Handling
    • Pointers To Functions
      • Pointers to Functions – Example
    • Handling Complex Declarations
    • Handling Complex Declarations
      • Declaration Procedure
      • The Right Left Rule
  • Structures
    • Structure Declaration
      • Name Spaces
    • Structure Members
    • Structure Initialization
    • Operations on Structures
  • Building New Data Types
    • Data Abstraction – typedef
    • Towards Complexity – One Step at a Time
    • Typedef and Structures
  • Dynamic Data Structures
    • Self Referential Structures
    • Linked Lists
    • Dynamic Memory Allocation
  • Multi File Programs
    • Issues in Multi File Programs
    • Variables — extern and static
  • Bit Twiddling
    • Introduction
    • Bit Twiddling Operations
      • Setting and Unsetting Bits
      • Bit Shifting
    • Portable Bit Manipulation
    • Printing Bit Representations
    • Example — Bit Manipulation
  • Additional Data Types
    • Enumerated Data Types
    • Bit Fields
    • Unions
  • The Preprocessor
    • Introduction
    • #define
    • #ifdef and #ifndef
    • #if
  • The Standard Libraries STDIO And Others
    • The Concept of a FILE
    • Character Handling Routines
    • Line and Record Handling Routines
    • Formatting Routines
    • Positioning Routines
    • The ANSI Libraries
  • Program Arguments
    • Invoking Programs
    • Parameters to main()
    • Processing argc and argv
  • ANSI C Coding Guidelines
    • Introduction
    • Programming vs. Program Design
      • Suggestions Related To Overall Design
    • Specific Coding Guidelines
      • Comments
      • Coding For Readability
      • Indentation
      • Brackets
      • Well-Chosen Identifier Names
      • Syntactical Forms To Be Avoided

Hardware and Software Requirements
An ANSI C compiler running on any platform.


Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 3

Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 4

Notice: Undefined variable: REMOTE_USER in /var/www/datadeliverance/inc/trademarks.inc on line 7

Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 7

Notice: Undefined index: printer in /var/www/datadeliverance/inc/trademarks.inc on line 11

Go to course catalogue