Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) You would use a stream's clear method to: A) empty the output buffer B) reset flags after a failed translation C) clear the screen

image text in transcribed
1) You would use a stream's clear method to: A) empty the output buffer B) reset flags after a failed translation C) clear the screen D) clean up after a bad file open attempt E) forget an end-of-file encounter before seeking back to the beginning 2) The three functions used to determine a stream's state are: A) eos B) eof C) bad D) fail E) ugly When none of these three is set, the stream is said to be in a state. 3) The method of the input streams can cause problems for your program in two main ways: A) fails when not finding a new-line (or the specified termination character) B) fails when filling its string buffer C) returns an emply string when a new-line (or the specified termination character) is immediately encoun- tered D) fails to flush cout on some compiler implementations E) fails when reading characters instead of numbers 4) The data type used to declare a variable to connect to a disk file is either ifstream or ofstream. These class types are both defined in thelibrary. However, when passing a file stream to a function we normally use the compatible types is because it provides compatibility also with the console streams (letting the one function work with both and respectively. This and an input file or with bothand an output file depending on what actual argument is passed). However, when using the stream must be passed through an ifstream or ofstream argument. (After all, who would want to do those or methods, the file actions to the console?!) Either way, streams must always be passed as arguments because no matter what you do to a stream, you are changing it in some way. TRUE/FALSE The operator has been overloaded to mean 'destructor. TRUE/FALSE The-operator means flip (i.e. toggle) the bits in an integer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions