C Programming
Overview
This C-Programming training will cover basics such as- programming techniques,
- macros, iterations,
- decision making statements,
- functions,
- 1D array, 2D arrays,
- pointers,
- dynamic memory allocation for arrays,
- dynamic memory allocation structures,
- linked list,
- file-handling and function pointers
5 Days
Pre-Requisites
Understanding of fundamental programming concepts
Course Outline
- Operating System Independence
- Design Goals and Capabilities
- Flavors of C
- Fundamental Data Types and Qualifiers
- Constants and Strings
- Storage Classes
- Scope and Block Structure
- Scope and Data Hiding
- Data Initialization
- Macros
- Functions versus Inlining
- Purpose of Macros
- Use of Macros
- Making Code More Readable
- Auto Adjustment of Compile Time Values
- Conditional Compilation
- Making Code Portable
- Simplifying Complex Access Calculations
- Advanced Micro Design Tips
- Using Macros to Help Write Portable Programs
- When to Use a Macro-instead of a Function
- Using Macros for Debugging
- Standard I/O Library
- Character Set Encoding
- Standard Input and Output
- Character I/O Functions
- Formatted I/O Functions
- String Constants
- Arithmetic, Logical, and Bit Operators
- Precedence and Associativity
- Assignment and Casting
- The Conditional Operator
- Purpose of Functions
- Functions versus Inlining
- Automatic Variables
- The Argument Stack
- Passing by Value
- Passing by Reference
- Declaring External Functions
- Function Prototyping
- ANSI Prototyping
- The _NO_PROTO Compiler Symbol
- Varargs Functions
- Passing a Function as an Argument
- Designing Functions for Reusability
- Calling a Function from Another Language
- Returning a Dynamically Allocated Value Using Double Indirection
- Casting the Return Value of a Function
- Recursion and Reentrancy
- Nested Structures
- Arrays of Structures
- Bit Fields
- Unions
- Linked Lists
- Strings as Character Arrays
- String Library Functions
- Reading and Writing Strings
- Structuring Code for Quality, Reliability, Maintainability
- Designing for Modularity and Reusability
- Compile-Time Directives
- Use of typedef
- C Pre-processor Syntax
- Advantages of Pointers
- User of Pointers
- Pointer and Address Arithmetic
- Dynamic Storage Allocation
- sizeof
- Double Indirection
- Purpose of Arrays
- Declaring an Array
- Initializing an Array
- Addressing Elements
- Stepping Through an Array
- Variable Size Arrays
- Arrays of Pointers
- Arrays of Strings
- Passing an Array to a Function
- Dynamic Memory Allocation
- Multidimensional Arrays
- Problem Analysis
- Instrumenting with printif
- Instrumenting with ctrace
- The Purpose of Debuggers
- How Not to Use Debuggers?
- Symbolic Debuggers
- Conditional Constructs: if, switch
- Looping Constructs: while, do, for
- Programming Style
- Purpose of Structures
- Defining and Declaring Structures
- Accessing Members
- Pointers to Structures
- Dynamic Memory Allocation
- Passing a Structure to a Function
- As a Pointer
- Passing the Actual Structure
- Character I/O
- Unformatted File I/O
- Formatted File I/O
- Math Functions
- Miscellaneous Functions
- Accessing Command Line Arguments and Environment Symbols
- argc and argv
- Parsing Command Line Options
- Accessing the Environment Array
- Writing Portable Code
- Use of Macros
- ANSI C Limits
- Feature Test Macros
- Client/Server Design
- Performance Considerations
