Reference no: EM13767668
Question 1. _____ are files to which data is written.
Output files
Input files
Active files
Sequential files
Question 2. When storing and retrieving data, a sequential access file is much like a _____.
floppy disk
book
hard disk
VCR tape
Question 3. Once you finish using a file, you should _____ it.
exit
append
close
output
Question 4. The header file that defines the classes for processing and manipulating files is called the _____.
<iostream>
<fstream>
<pstream>
<mstream>
Question 5. What do the following statements accomplish?
ofstream theFile;
theFile.open( myFile.txt , ios::out);
Opens myFile in read mode
Opens myFile in append mode
Creates an empty file named myFile
Opens a file in input mode to write to
Question 6. When a file is opened in output mode, the file pointer is positioned _____.
at the end of the file
at the beginning of the file
in the middle of the file
after the file header
Question 7. Which of the following functions should be used to determine if a file was successfully closed?
is_active
is_open
is_closed
is_ready
Question 8. What is the data hierarchy arranged from largest to smallest?
File, field, record, byte, bit
File record, field, bit, byte
File, record, field, byte, bit
Record, file, field, bit, byte
Question 9. To use an input file, the program must include _____.
fstream
instream
outstream
filestream
Question 10. Which of the following is not true about files?
C++ views each file as a sequential stream of bytes.
Files are opened by creating objects of stream classes.
Member functions of stream objects can be applied to file streams.
istream, ostream, and iostream are derived from ifstream, ofstream, and fstream, respectively.
Question 11. Compare and contrast the mode operators ios::in, ios::app, and ios::out. Provide a C++ code segment that illustrates the use of these mode operators.
Attempts to model all of the uncertainties of the real world
: Which method best attempts to model all of the uncertainties of the real world?
|
Forecast gross profit in the second year
: Tversky and Co. have devised a new psychological test for investors' risk tolerance. They expect to sell 10,000 tests in the first year at $150 each. Cash costs associated with producing, administering and scoring the test are $50 per unit. In the..
|
What are some recent and contemporary examples of successes
: What are some recent and contemporary examples of successes and failure in community engagement? (Ferguson, New York, other examples)
|
Create an amortization schedule for the first two months
: You have borrowed $70,000 to buy a speed boat. You plan to make monthly payments over a 15-year period. The bank has offered you a 9% interest rate, compounded monthly. Create an amortization schedule for the first two months of the loan.
|
Compare and contrast the mode operators ios
: Compare and contrast the mode operators ios::in, ios::app, and ios::out. Provide a C++ code segment that illustrates the use of these mode operators.
|
Variable cost per unit projection for a project
: Les is concerned that his variable cost per unit projection for a project may not be reliable. Which type of analysis will help him determine the effect that an incorrect variable cost estimate will have on the final outcome of the project?
|
What was the semi-annual current yield
: The City of Ames issued a new series of bonds on Jan 1, 2009. The bonds were sold at par ($1,000), have a 3.5% annual coupon rate and mature in 10 years, on Jan 1, 2019. Coupon interest payments are made semi-annually (on June 30 and December 31). Wh..
|
What remedies may tommy get
: Jimmy, an art dealer and merchant, is running out of funds. Luckily, he owns a priceless Van Gogh painting. He writes his friend Tommy. Is there a breach of contract? If so, what remedies may Tommy get
|
In a decision tree-accept-reject decision is dependent
: In a decision tree, the accept/reject decision is dependent upon:
|