DRAFT: This module has unpublished changes.

Ch.2

iostream – output on the screen and read input from the keyboard.

cout  << “Delta”;

(stream insertion)

The stream insertion operator sends a item to the right of the operator which is cout and display on the screen.

endl and escape sequences.

  1. endl is a steam manipulator. Programmers use it to start with a new line
  2. escape sequences are used in the statement and work.

Variables – variables represent storage locations in the computer’s memory and a variable can easily be changed.

Variable definition – It tells the compiler the variable’s name and the type of data it will hold.

“ “ marks – using “ ” marks make a integer value change to a string literal.

Literals – literals are constant values that are assigned to variables and literals are constants.

An assignment – using with = symbol and copies the value on its right into the variable named on.

(eg: number = 5)

Identifiers

  1. Don’t use C ++ keywords.
  2. Can mix uppercase and lowercase letters in the name of identifiers.
  3. Identifiers cannot start with a digit.
  4. Identifiers can only use letters, digits, or underscores.
DRAFT: This module has unpublished changes.