Students Will Learn |
- Data Types, Storage Classes, & Scope
- Pointers, Arrays, and Dynamic Allocation
- Compiler Directives, Pre processor, and Macros
- Operators and Expressions
- Functions and C Runtime Library
- Structures and Unions
|
Course Description: This hands on C programming course provides a comprehensive introduction to the ANSI C language, emphasizing portability and structured design. Students are introduced to all major language elements including fundamental data types, flow control, and standard function libraries. Thorough treatment is given to the topics of string and character manipulation, dynamic memory allocation, standard I/O, macro definition, and the C runtime library. The course explains the use of aggregate structures, unions, and pointers early on so the students can practice extensively in the hands on labs. Structured programming constructs and viragos functions are also covered. Emphasis is given to the processing of command line arguments and environment variables so students will be able to write flexible, user-friendly programs. The course also includes coverage of portability tips drawn from experienced programmers working in production environments. Comprehensive hands on exercises are performed throughout training each day to reinforce key concepts.
|
|
Course Prerequisites: Understanding of fundamental programming concepts. |
|
C Programming Course Overview |
|
Overview of C |
Compiler Directives and the C Pre processor |
- Operating System Independence
- Design Goals and Capabilities
- Flavours of C
|
- Compile-Time Directives
- Use of typed of
- C Pre processor Syntax
|
Fundamental Data Types, Storage Classes, and Scope |
Pointers and Dynamic Allocation |
- Fundamental Data Types and Qualifiers
- Constants and Strings
- Storage Classes
- Scope and Block Structure
- Scope and Data Hiding
- Data Initialization
|
- Advantages of Pointers
- User of Pointers
- Pointer and Address Arithmetic
- Dynamic Storage Allocation
- Size of Double Indirection
|
Macros |
Arrays |
- Functions versus In lining
- 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
|
- 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
|
Basic Formatted I/O |
Program Debugging |
- Standard I/O Library
- Character Set Encoding
- Standard Input and Output
- Character I/O Functions
- Formatted I/O Functions
- String Constants
|
- Problem Analysis
- Instrumenting with printif
- Instrumenting with c trace
- The Purpose of Debuggers
- How Not to Use Debuggers
- Symbolic Debuggers
|
Operators and Expressions |
Flow Control Constructs |
- Arithmetic, Logical, and Bit Operators
- Precedence and Associatively
- Assignment and Casting
- The Conditional Operator
|
- Conditional Constructs: if, switch
- Looping Constructs: while, do, for
- Programming Style
|
Functions (Subroutines) |
Structures |
- 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 Re-entrancy
|
- 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
|
C Runtime Library Standard Functions |
- Character I/O
- Unformatted File I/O
- Formatted File I/O
- Math Functions
- Miscellaneous Functions
|
|
Advanced Structures and Unions |
Accessing Command Line Arguments and Environment Symbols |
- Nested Structures
- Arrays of Structures
- Bit Fields
- Unions
- Linked Lists
|
- argc and argv
- Parsing Command Line Options
- Accessing the Environment Array
|
Strings and Character Manipulation |
Advanced Programming Consideration |
- Strings as Character Arrays
- String Library Functions
- Reading and Writing Strings
|
- Writing Portable Code
- Use of Macros
- ANSI C Limits
- Feature Test Macros
- Client/Server Design
- Performance Considerations
|
Structured Programming |
|
- Structuring Code for Quality, Reliability, Maintainability
- Designing for Modularity and Reusability
|
|
Student Testimonials |
"The course exceeded my expectations. I expected to get a kick start on the road to learning C. Instead I felt I now have a solid ground of the fundamentals and I'm ready to dive in with both feet."
– Ravi,student |
|
"I enjoyed the class way more than I enjoyed trying to figure out C on my own."
– Krishna |
|
"Excellent course – nice combination of labs and instruction."
– Deepthi |