Stream Input/Output Flashcards
Where does I/O occur?
In streams
What is a stream?
A sequence of bytes
Low level I/O
Device to memory
High level I/O
Bytes grouped into units (ex: integers, strings)
Unformatted vs formatted I/O
Unformatted is faster but difficult to use
Formatted requires extra processing time but is readable
How to declare all stream I/O operations?
<iostream>
</iostream>
How to declare parameterized stream manipulators?
<iomanip>
</iomanip>
basic_istream and basic_ostream
Templates for input and output respectively
Template that supports both input and output?
basic_iostream
istream object cin tied to….
standard input device (keyboard)
ostream cout tied to….
Standard output device (screen)
Unbuffered ostream output?
cerr
Buffered ostream output
clog
How are data types determined for input and output?
Automatically by compiler
How are addresses displayed?
Hexadecimal
How can you print the address in a pointer variable?
Cast pointer to void*
What member function outputs one character and can be cascaded?
put
Properties of stream input stream extraction operator»_space;
Automatically skips white space characters
Returns false after end of file encountered
How to input series of values using stream extraction operation?
In a while looo
Which member function inputs one character and returns character or EOF at end of file?
get
What function reads line of string but removes the delimiter and does not store
getline
How to skip specified number of characters in an input stream?
ignore member function
How to place previous character obtained by get on a stream back into stream
putback
Which function returns next character from input stream but does not extract from the stream?
peek