ENGR 101 Lecture Notes - Lecture 13: Logical Connective, Semicolon, Switch Statement
Document Summary
>> and << send output to and get input from external streams (keyboards,screens) = sets the value of an identifier. The insertion and extraction operator the insertion operator produces output: ostream << expression. Ostream is an output stream typically the standard output, cout (the screen), or a file to skip output to the next line, use and end of line command (endl) Text is output using string literals which are enclosed in quotes . Causes the output to skip to the next line input: the extraction operator gathers istream>>identifier istream is an input stream typically standard input, cin (the keyboard), or a file. Both operators have lower precedence than the mathematical operators. Always do the math stuff first before the operators. A series of << or >> operation are evaluated left to right. Expects an identifier on the left and an expression on the right identifier = expression;