C/C++ Language:

1: C Language 2: C++ Language

• Introduction


• Declaring Variables


• Preprocessor Statements


• Arithmetic Operators


• Programming Style


• Keyboard Input


• Relational Operators


• For and while loops


• If, if else, relational operators


• Switch/case


• String and character handling


• Data validation examples


• Conditional expression operator


• Arrays


• Functions


• Additional assignment operator


• Sample programs so far


• Handling user input and Validation


• Formatters for printf() and scanf(), bit operations


• Structures


• Data conversion with itoa() and atoi()


• Files


• Pointers


• Dynamic Memory Allocation


• Preprocessor Statements, Macros, Conditional Compilation, typedef


• Eumerated Data Types


• Unions


• Register based variables, null statements and strings


• Command Line Arguments


• Pointers to functions


• Formatters for characters and strings


• System Calls


• Suggested solutions to all problems


• Advanced C, hardware accessing, longjump/ctrl break, comms


• Interactive tests

    1: Introducing C++

  • Some Remarks about Programming
  • The Origins of C++
  • ANSI/ISO C++
  • The C++ Programming Environment in UNIX
  • An Example C++ Program
  • Very Simple Input, Output and Assignment
  • Simple Flow of Control
  • 1.8 Preliminary Remarks about Program Style Exercises

  • 2.1: Identifiers
  • 2.2: Data Types
  • Integers
    Real numbers
    Type Casting
    Characters>
    Strings
    User Defined Data Types

    2.3: Some Tips on Formatting Real Number Output

  • Enumerations
  • Where to put Constant and Variable Declarations
  • Shorthand Arithmetic Assignment Statements
  • Boolean Expressions and Operators Exercises
  • 3.1: The Need for Sub-programs
  • 3.2: User-defined Functions
  • 3.3: Value and Reference Parameters
    Functions which use Value Parameters are Safe
    Reference Parameters
  • 3.4: Polymorphism and Overloading

    3.5 Procedural Abstraction and Good Programming Style

    3.6 Splitting Programs into Different Files Exercises


    4: Files and Streams

    4.1. Why Use Files?

  • Creating Streams
  • Connecting and Disconnecting Streams to Files
  • 4.3 Checking for Failure with File Commands

  • Input using "get()"
  • Output using "put()"
  • The "putback()" Function
  • 4.5 Checking for the End of an Input File

    4.6 Streams as Arguments in Functions

    4.7 Input and Output Using ">>" and "<<" Exercises


    5: Branch and Loop Statements

    5.1 Boolean Values, Expressions and Functions Note: The Identifiers "true" and "false" in C++

    5.2 "For", "While" and "Do ... While" Loops

    5.3 Multiple Selection and Switch Statements

    5.4 Blocks and Scoping

    5.5 A Remark about Nested Loop Statements Exercises


    6: Arrays and Strings

  • Declaring an array
  • Assignment Statements and Expressions with Array Elements
  • 6.2 Arrays as Parameters in Functions

    6.3 Sorting Arrays

    6.4 Two-dimensional Arrays

  • The Sentinel String Character '\0'
  • String Variable Declarations and Assignments
  • Some Predefined String Functions
  • String Input using "getline()"

  • 7: Pointers

  • Declaring Pointers
  • Assignments with Pointers Using the Operators "*" and "&"
  • The "new" and "delete" operators, and the constant "NULL"
  • 7.2 Array Variables and Pointer Arithmetic

    7.3 Dynamic Arrays

    7.4 Automatic and Dynamic Variables

  • The "." and "->" Operators
  • Creating a Linked List
  • Printing a Linked List

  • 8: Recursion

    8.2 A Simple Example

    8.3 The Mechanics of a Recursive Call

    8.4 Three More Examples

    8.5 Recursion and Iteration

    8.6 Recursive Data Structures

    8.7 Quick Sort - A Recursive Procedure for Sorting