13- file input/ouput Flashcards

1
Q

stream

A

is a sequence of data to be read (input stream) or a sequence of data generated by the program to be output (output stream)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

fail()

A

returns true if previous stream operation failed
useful to check if file is opened successfully before performing operations on file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

exit()

A

exists program immediately.
to use exit, include <cstdlib>
exit() accepts one integer as argument:
convention: 0 - normal program termination; nonzero - abnormal</cstdlib>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly