C Programming (CPP102)
Build practical ANSI C programming skills with data types, operators, control flow, functions, pointers, arrays, structures, and preprocessor basics.
Register or Request Training
- Private class for your team
- Live expert instructor
- Online or on‑location
- Customizable agenda
- Proposal responses same day as request
Course Overview
Designed for programmers who are new to ANSI C, this course teaches students how to design, write, compile, and run C programs. Participants explore data types, operators, control flow, functions, pointers, arrays, structures, and the C preprocessor.
Course Benefits
- Understand the purpose, features, and fundamental syntax of C.
- Declare and use C data types, variables, constants, operators, and expressions.
- Control program execution with conditional statements and loops.
- Define and use functions, arguments, return values, and variable scope.
- Use pointers, arrays, strings, and pointer arithmetic.
- Organize related data with structures and dynamically allocate memory.
- Use C preprocessor features such as symbolic constants, macros, and file inclusion.
- Compile and run C programs.
Delivery Methods
Delivered for your team at your site or online.
Course Outline
- Introduction to C
- What Is C?
- Features of C
- Why Program in C?
- History of C
- Current Status and Future
- An Overview of C
- The First Program (hello.c)
- How to Compile and Run a C Program
- An Arithmetic Program (roof.c)
- Execution Flow Control (mph.c)
- The for Loop
- The for Loop
- Diagram
- Character I/O
- A File Copier Program (cp2.c)
- A Character Counter (wc2.c)
- A Look at Arrays
- Stock Values (stock1.c)
- The char Data Type
- Strings (Character Arrays)
- A String Copy Program (stringcp.c)
- A Look at Functions
- A Functional Program (func1.c)
- A Review of printf()
- Data Types and Variables
- Fundamental Data Types
- Data Type Values and Sizes
- Variable Declarations
- Variable Names
- Constants
- Character Constants
- String Constants
- Operators and Expressions
- What Are Expressions?
- Arithmetic Operators
- Relational Operators
- Assignment Operator
- Expressions Have Resulting Values
- True and False
- Logical Operators
- Increment and Decrement Operators (++ and --)
- Increment and Decrement Operators: Examples
- 'Operate-
- Assign' Operators (+=, *=, ...)
- Conditional Expression
- Operator Precedence
- Precedence and Order of Evaluation
- Evaluation of Logical Operators
- Type Conversions
- The Cast Operator
- Bitwise Logical Operators
- Control Flow
- Statements
- if - else
- if() - else if()
- else if()
- switch()
- while()
- do-while()
- for()
- The for Loop-Diagram
- Example: for() Loop
- Another Example: for() Loop
- The break Statement
- The continue Statement
- Functions
- What Is a Function?
- Example: findbig3()
- Why Use Functions?
- Anatomy of a Function
- Example: find_big_int()
- Arguments Passed by Value
- Addresses of Arguments Can Be Passed
- A Picture of Addresses and Values
- When to Use the Return Statement
- Returning Non-Integer Values
- Functions in Multiple Source Files
- A Simple make File
- The Concept of Variable Scope
- Automatic Variables
- Global (External) Variables
- Static Variables
- External Static Variables
- The C Preprocessor
- Symbolic Constants
- Macro Substitution
- File Inclusion
- Pointers and Arrays
- What Is a Pointer?
- Pointer Operators
- Example: Pointers
- Why Use Pointers?
- Arrays
- Arrays (a Picture)
- The & Operator
- Pointers and Arrays
- Pointer Arithmetic
- Pointer Arithmetic (a Picture)
- Arrays and Pointers
- Array Names are Constant Pointers
- Passing A
- Arrays to Functions
- Initializing Arrays
- Advanced Pointers
- Pointer Initialization
- Command-line Arguments
- Strings and Character Pointers
- Arrays of Pointers
- Command-Line Arguments
- Access Through Pointers
- Functions and Pointers
- Example: Functions and Pointers
- Structures
- Structures
- Comparison of Structures and Arrays
- Structure Definitions
- Structure Declarations
- Structure Parameter Passing by Reference
- Pointers to Structures
- Structure Parameter Passing Again
- Arrays of Structures
- The malloc Routine
Class Materials
Each student receives a comprehensive set of materials, including course notes and all class examples.
Class Prerequisites
Experience in the following is required for this C/C++ class:
- Prior programming experience and a need to learn the C language.
Experience in the following would be useful for this C/C++ class:
- Experience with a high-level programming language, such as Pascal or COBOL.
- Basic UNIX user skills.
Have questions about this course?
We can help with curriculum details, delivery options, pricing, or anything else. Reach out and we’ll point you in the right direction.
