Target Audience
The course is aimed at developers' not familiar C program development. This course covers all aspects of Programming with C. The course teaches the design, writing and testing of C programs. Many exercises are performed by the developer to ensure that the statements taught are fully understood and practical experience is gained.
Pre-requisites
Knowledge of the host environment is required (either z/OS or Windows).
Course Objectives
Whilst covering the basics of C programming and how it is used, this course also aims to give an insight into structuring C programs, C verbs, manipulating data,using functions and testing C programs.
On completion of this course the student will be able to:
-
Develop Structured C Programs
-
Understand and Use C Verbs
-
Develop C programs using the available verbs
-
Develop and use C Functions
-
Develop and Test C programs accessing different types of files
Course Environment
Development will be performed using either:
-
IBM Mainframe
-
Visual C++ running on a Windows platform
Course Details
- GETTING STARTED
- What Is C?
- Program Example
- Commencing A Program - Include
- C Functions
- Comments
- Variable Declaration
- Coding C Statements
- Compiling And Linking
- Running The Program
- VARIABLES, DATA TYPES AND CONSTANTS
- Declaration Of Variables
- Reserved Words
- Variable Declaration
- Data Types
- Unsigned Data Types
- Global And Local Variables
- Variable Initialisation - The Static Keyword
- Assigning Values To Variables
- Working With Characters
- Special Escape Characters
- Working With Floating Point Numbers
- Specifying Numeric Values
- Constants
- Setting Up Symbolic Constants - The #Define Statement
- EXPRESSIONS, ASSIGNMENTS AND OPERATORS
- Operator Introduction
- Operators
- Arithmetic Operators
- Postfix And Prefix Unary Operators
- Bitwise Operators
- Assignment Operators
- Expressions
- Data Type Conversion In Assignments
- Casting
- Relational Operators
- Conditional Operators
- The Tertiary Operator
- Summary Example
- CONTROL AND FLOW
- Control Flow Statements
- The If Statement
- Nested If Statements
- The Switch Statement
- The While Statement
- The Do While Statement
- The For Statement
- Nested Loops
- Unconditional / Endless Loops
- The Break Statement
- The Continue Statement
- The Goto Statement
- Conditional Expressions
- The Comma Operator
- FUNCTIONS
- Overview
- Internal Functions
- Function Prototypes
- Passing Arguments To Functions
- Returning Arguments From Functions - Return
- Global And Local Variables - Variable Scope
- 'Call By Value' Function Invocation
- Storage Classes
- 'Call By Reference' Function Invocation
- Calling External Functions
- Passing Arguments To The Main Function
- ARRAYS / STRINGS
- Basic Data Types
- Array Definition
- Array Initialisation
- Accessing Array Elements
- Array Operations
- Arrays With Functions
- Using Arrays As Arguments
- Character Strings
- String Literals / Manipulation
- Character String Comparisons
- Multi - Dimensional Arrays
- STRUCTURES AND UNIONS
- Structure Definition
- Accessing Members Using A Variable
- Structure Level Operations
- Structure Lengths
- Using Typedef To Provide A Type Alias
- Nesting Data Structures
- Structure Arrays
- Using Structures With Functions
- Unions
- ADDRESSES AND POINTERS
- Declaring Pointers
- Examples Of Pointer Manipulation
- Pointer Manipulation
- Pointers To Pointers
- Passing Pointers To Functions
- Returning Pointers From Functions
- Pointers And Arrays
- Pointer Comparison
- Using Pointers To Pass Arrays To Functions
- Dynamic Memory Allocation
- Pointers And Structures
- Pointers To Structure Arrays
- Pointer Conversion
- Linked Lists
- THE PREPROCESSOR
- Pre-Processor Directives
- The #Define Directive
- #Define Macros
- The #Include Statement
- The #If Statement
- The #Ifdef Statement
- DATA INPUT / OUTPUT
- Data Input / Output
- Standard I/O Streams
- File Access
- The File Handle Statement
- File Open And Close
- Reading And Writing To A File
- Fscanf
- Fprintf
- Fgets
- Fputs
- Fread
- Fwrite
- Getc And Putc (or Fgetc and Fputc)
- Redirection Of Input / Output
- System File Pointers
- Rewinding A File
- Direct Access / Updating Records
- File Positioning - Fseek
- Ftell - Determining the Current Position
- C SUPPLIED FUNCTIONS
- Writing To The Terminal - Printf
- Printf Conversion Specifications
- Reading Data From The Terminal - Scanf
- Scanf Conversion Specifications
- Using Scanf to Split at a Given Character
- Using Scanf to Read Until a Given Character is Found
- Scanf Problems When Receiving Unexpected Data
- The Getchar Function
- The Putchar Function
- The Sizeof Function
- The Malloc Function
- The Toupper / Tolower Functions
- Date And Time Functions - Time / Localtime
- The Strftime Function
- The Asctime Function
- STRING FUNCTIONS
- The Gets Function
- The Puts Function
- The Sprintf Function
- The Sscanf Function
- The Strcat Function
- The Strchr Function
- The Strcmp Function
- The Strcpy Function
- The Strcspn Function
- The Strlen Function
- The Strncat Function
- The Strncmp Function
- The Strncpy Function
- The Strpbrk Function
- The Strrchr Function
- The Strspn Function
- The Strstr Function
- Character String Data Conversion
Course Format
Practical sessions make up a large part of the course, allowing delegates to demonstrate and reinforce the lectures given. During these sessions the delegate will gain experience of writing and testing different types of C programs using the various C verbs available.
Examples are used extensively, ranging from simple code snippets to full applications with complete ‘real world’ functionality. These are supplied at the start of the course and it is encouraged that the delegates execute and ‘experiment’ with these under the instructor’s guidance as they are introduced.
These examples are available to take away, along with the delegate’s own work.
The comprehensive Student Guide supplied is fully indexed serving as a useful reference tool long after the course has finished. Delegates will also be able to access a free help-line with technical questions relating to topics covered on the course.
|