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.
- endl is a steam manipulator. Programmers use it to start with a new line
- 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
- Don’t use C ++ keywords.
- Can mix uppercase and lowercase letters in the name of identifiers.
- Identifiers cannot start with a digit.
- Identifiers can only use letters, digits, or underscores.