Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Which of the following is the state bit that is set when an attempted operation fails? ios::failbit ios::badbit ios::hardfail ios::goodbit None of these 2.

1.

Which of the following is the state bit that is set when an attempted operation fails?

ios::failbit
ios::badbit
ios::hardfail
ios::goodbit
None of these

2.

When a file is opened, the file stream object's "read position" is

at the end of the file
at the beginning of the file
nonexistent until the programmer declares it
in the middle of the file
None of these

3.

Which of the following is the member function that writes a single character to a file?

get
write
put
insert
None of these

4.

Which of the following data types can be used to create files and read information from them into memory?

ofstream
istream
ifstream
instream
None of these

5.

Which of the following is the data type that can be used to create files, read data from them, and write data to them?

ofstream
ifstream
fstream
stream
None of these

6.

All stream objects have ________ which indicate the position of the stream.

error state bits
condition statements
markers
intrinsic error messages
None of these

7.

ofstream, ifstream, and fstream are

header files
libraries
data types
string arrays
None of these

8.

Data stored ________ disappears once the program stops running or the computer is powered down.

on a CD
in RAM
on a flash drive
on the disk drive
None of these

9.

What is TRUE about the following statement? out.open("values.dat", ios::app);

If the file already exists, its contents are preserved and all output is written to the end of the file.
If the file already exists, it should be replaced with a new copy of values.dat.
If the file already exists, it can be opened but not modified.
None of these

10.

Closing a file causes any unsaved information still held in the file buffer to be

saved to the file
deleted
retained in the buffer for safekeeping
duplicated
None of these

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_2

Step: 3

blur-text-image_3

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

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago