Description
This course builds upon the student's knowledge
of C. It describes how C can be made portable, efficient, and maintainable.
Emphasis is placed on writing reusable packages of code. The use and abuse
of pointer variables is covered in detail.
This class assumes the student has programmed in
C for at least six months. The three day class combines lecture with hands-on
exercises.
Objectives
By the end of the course you will be able to:
- Use C effectively in a wide variety of applications
- Understand how pointers can and should be used
- Know how to write portable, maintainable programs
Outline
- Review of C features
- Structures
- Typedefs
- Coding standards
- ANSI C features
- Prototypes
- Const variables
- Standard library
- Writing maintainable, testable code
- Avoiding the need to debug
- Avoiding memory leaks
- Using a debugger
- Pointers
- When to use and not use pointers
- Double pointers - handles
- Function pointers
- Avoiding pointer problems
- Objects in C - function and data abstraction
- Hiding the implementation
- Creating an interface specification
- Making a package reusable
- Portability
- Creating a portable program
- Portability is maintainability
- User interface
- Command line parsing
- Program exit values
- Data structures
- Linked lists versus arrays
- Dynamic memory allocation
- Error handling
- Internal handling of errors
- Logging errors
- When to abort the program
- Making C efficient
- Optimization techniques
- When not to optimize
- Bit operations
- Bitwise operators
- Bit fields
- Multiple source files
- Version control
- Make and makefiles
- Controlling variations
- Function libraries
- ANSI
- Platform specific
- Interface to operating system
|