Compare and contrast the mode operators ios

Assignment Help C/C++ Programming
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.

Reference no: EM13767668

Questions Cloud

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:

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd