stream
is a sequence of data to be read (input stream) or a sequence of data generated by the program to be output (output stream)
fail()
returns true if previous stream operation failed
useful to check if file is opened successfully before performing operations on file
exit()
exists program immediately.
to use exit, include <cstdlib>
exit() accepts one integer as argument:
convention: 0 - normal program termination; nonzero - abnormal</cstdlib>