- Tel: +44 (0)1275 859666
BT07 - C Programming Workshop - 4 Days
Course Description
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).
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
Environment
Development will be performed using:
- Microsoft Visual Studio
Customisation
For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.
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
- Program Example
- 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
- Reserved Words
- 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
- Operators
- 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
- The If Statement
- FUNCTIONS
- Overview
- Internal Functions
- Function Prototypes
- Passing Arguments To Functions
- Returning Arguments From Functions - Return
- Global And Local Variables - Variable Scope
- xxCall By Valuexx Function Invocation
- Storage Classes
- xxCall By Referencexx Function Invocation
- Calling External Functions
- Passing Arguments To The Main Function
- Internal Functions
- 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
- Array Definition
- 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
- Accessing Members Using A Variable
- 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
- Examples Of Pointer Manipulation
- THE PREPROCESSOR
- Pre-Processor Directives
- The #Define Directive
- #Define Macros
- The #Include Statement
- The #If Statement
- The #Ifdef Statement
- The #Define Directive
- 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 / Fscanf_s
- 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
- Standard I/O Streams
- C SUPPLIED FUNCTIONS
- Writing To The Terminal - Printf
- Printf Conversion Specifications
- Reading Data From The Terminal - Scanf / Scanf_s
- 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
- Printf Conversion Specifications
- STRING FUNCTIONS
- The Gets Function
- The Puts Function
- The Sprintf Function
- The Sscanf / Scanf_s Functions
- 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
- The Puts Function