Start Date: 08/03/2022
Course Overview
Who should attend?
C programmers.Prerequisite:
Course Outline:
1. Introduction
• The place of the C language
• Why advanced C
2. Pointers
• Pointer Variables
• The Address and Indirection Operators
• Pointer Assignment
• Pointers as Arguments
• Using const to Protect Arguments
• Pointers as Return Values
3. Pointers and Arrays
• Pointer Arithmetic
• Pointers to Compound Literals
• Using Pointers for Array Processing
• Combining the * and ++ Operators
• Using an Array Name as a Pointer
• Using a Pointer as an Array Name
• Pointers and Multidimensional Arrays
• Pointers and Variable-Length Arrays
4. Strings
• String Literals
– Continuing a String Literal
– How String Literals Are Stored
– Operations on String Literals
– String Literals and Character Constants
• String Variables
– Character Arrays and Pointers
• Reading and Writing Strings
• Accessing the Characters in a String
• Using the C String Library
• Arrays of Strings
• Command-Line Arguments
5. Advanced Pointer Use
• Dynamic Storage Allocation
• Dynamically Allocated Strings
• Dynamically Allocated Arrays
• Deallocating Storage
• Linked Lists
– The -> Operator
– Inserting, Searching, Deleting
– Ordered Lists
• Pointers to Pointers
• Pointers to Functions
• Function Pointers as Arguments
6. The Preprocessor
• How the Preprocessor Works
• Preprocessing Directives
• Macro Definitions
– The # and ## Operators
– General macro properties
– Using parentheses
– Creating Longer Macros
– Predefined Macros
– Macro Arguments
– The __func__ Identifier
• Conditional Compilation
– The defined Operator
– Uses of conditional compilation
• Miscellaneous Directives
– _Pragma Operator
• Local and static local variables
• Parameters
• External Variables
• Blocks
• Scope
• Organizing a C Program
• Source files
• Header files
– Sharing
– Protecting header files
– #error in header files
• Dividing a program into files
• Building a multi-file program
• Defining macros outside a program
9. Program Design
• Modules
– Types of Modules
• Information Hiding
• Abstract Data Types
• Design Issues for Abstract Data Types
– Naming Conventions
– Generic ADTs
10. Input/Output
• Streams
– Standard streams and redirection
– Text and binary files
• File Operations
– File names from the command line
– Temporary files
– File buffering
– Miscellaneous file operations
• Formatted I/O
– scanf
– End-of-file and error conditions
• Character I/O
• Line I/O
• Block I/O
• File Positioning
• String I/O
11. The Standard Library
• Using the library
• C89 library overview
• C99 library changes
• <stddef.h> header
• <stdbool.h> header (C99)
12. Library Support for Numbers and Character Data
• <float.h>
• <limits.h>
• <math.h> – C89 and C99
• <ctype.h>
• <string.h>
• Error Handling
• <assert.h>
• <signal.h>
13. Miscellaneous Library Functions
• <stdarg.h>
– v…printf functions
– v…scanf functions
• <stdlib.h>
• <time.h>
14. Summary