Content
- Introduction
- What is C?
- Background
- Sample Program
- Components of a C Program
- Examples
- Data Types
- Variables
- Naming Conventions for C Variables
- Printing and Initializing Variables
- Array Examples
- Compiling and Executing a C Program
- Functions and Operators
- Examples of C Functions
- Functions
- sum Invoked from main
- Invoking Functions
- Elementary Operators
- The operator= Operators
- Operators
- The Conditional Operator
- Increment and Decrement Examples
- Increment and Decrement Operators
- Control Flow Constructs
- Examples of Expressions
- if
- if else
- while
- for
- Endless Loops
- do while
- break and continue
- switch
- else if
- The C Preprocessor
- #define
- Macros
- #include
- Conditional Compilation
- #ifdef
- #ifndef
- Simple I/O
- Character I/O
- End of File
- Simple I/O Examples
- Simple I/O Redirection
- I/O with Character Arrays
- More on Functions
- General
- Function Declarations
- Returning a Value or Not
- Function Prototypes
- Arguments and Parameters
- Organization of C Source Files
- Extended Example
- The getline Function
- The strcmp Function
- The check Function
- The atoi Function
- The average Function
- Bit Manipulation
- Defining the Problem Space
- A Programming Example
- Bit Wise Operators
- Bit Manipulation Functions
- Circular Shifts
- Chapter 8: Strings
- Fundamental Concepts
- Aggregate Operations
- String Functions
- Higher Dimensional Arrays
- Array Dimensions
- An Array as an Argument to a Function
- String Arrays
- Chapter 10: Separate Compilation
- Compiling Over Several Files
- Function Scope
- File Scope
- Program Scope
- Local static
- register and extern
- Object Files
- Libraries
- The C Loader
- Header Files
- Pointers (Part 1)
- Fundamental Concepts
- Pointer Operators and Operations
- Changing an Argument with a Function Call
- Pointer Arithmetic
- Array Traversal
- String Functions with Pointers
- Pointer Difference
- Prototypes for String Parameters
- Relationship Between an Array and a Pointer
- The Pointer Notation *p++
- Pointers (Part 2)
- Dynamic Storage Allocation - malloc
- Functions Returning a Pointer
- Initialization of Pointers
- gets - a Function Returning a Pointer
- An Array of Character Pointers
- Two Dimensional Arrays vs. Array of Pointers
- Command Line Arguments
- Pointers to Pointers
- Practice with Pointers
- Function Pointers
- Structures
- Fundamental Concepts
- Describing a Structure
- Creating Structures
- Operations on Structures
- Functions Returning Structures
- Passing Structures to Functions
- Pointers to Structures
- Array of Structures
- Functions Returning a Pointer to a Structure
- Structure Related Items
- typedef - New Name for an Existing Type
- Bit Fields
- unions
- Non-Homogeneous Arrays
- Enumerations
- File I/O
- System Calls vs. Library Calls
- Opening Disk Files
- fopen
- I/O Library Functions
- Copying a File
- Character Input vs. Line Input
- scanf
- printf
- fclose
- Servicing Errors - errno.h
- Feof
- Information About Files
- The stat Function
- File Existence
- Telling Time - time and ctime
- Telling Time localtime
- I/O With Structures
- A Database Application
- The menu Function
- The fwrite Function
- The create_db Function
- The fread Function
- The print_db Function
- fseek
- The retrieve_db Function
- fflush and ftell
- Useful Library Functions
- strstr
- strchr, strrchr
- system
- strtok
- strspn, strcspn
- Math Functions
- Character Testing Functions
- exit and atexit
- signal
- memcpy and memset
- qsort
- Binary Search - bsearch
- Introduction:
- Course Prerequisites
- Course Objectives
- LCourse Delivery
- Course Practicals
- Course Structure
- An Overview of OO Programming and C++:
- Review of OOP principles
- Behaviour, state, identity,inheritance, polymorphism
- History and evolution of C++
- Key features of C++
- C++ as a better and safer C
- The Class Approach:
- Grouping of data and functionality
- Syntax of a class declaration
- Syntax of use
- Public and private
- Abstract Data Types
- Program structure
- Providing Class Functionality:
- Member functions
- Function overloading
- Default arguments
- Ambiguities
- Anonymous arguments
- Resolving scope conflicts
- The Scope resolution operator
- The this pointer
- Object :
- Life of an object
- Constructors
- operator new
- Death of an object
- Destructors
- operator delete
- Dynamic arrays
- Efficiency and Integrity Issues:
- Enumerations
- Const declarations
- Const member functions
- Const member data
- Inline function mechanism
- Reference variables
- Composite Classes:
- An opportunity for reuse
- Scoping and initialisation
- Order of construction
- Member Initialisation lists
- Use of fundamental classes
- Associative Classes:
- Delegating class functionality
- Dynamic associations
- Custody and lifetime
- Constant associations
- Operator Overloading:
- Operator functions
- Unary operators
- Binary operators
- Global operators
- Member operators
- Subscript operators
- Input operators
- Output operators
- Guidelines
- Class Properties:
- Static data members
- Static member functions
- Nested types
- Forward declarations
- Friend classes
- Container Classes:
- Organising collections of objects
- Template classes
- vector
- list
- Iterators
- Template functions
- Algorithms
- Using the Standard Library
- Copying and Conversions:
- The copy assignment operator
- Copy constructors
- Conversions to a class object
- Conversions from a class object
- Inheritance:
- Extension of existing classes
- Notation, syntax, terminology
- Protected members
- Scoping and initialisation
- Multiple inheritance
- Abstract base classes
- Guidelines
- Polymorphism:
- Modified class behaviour
- Virtual functions
- virtual destructors
- Late binding
- Inside the virtual function mechanism
- Pure virtual functions
- Use of pointers to base type
- Guidelines