1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
erik [133]
3 years ago
11

Write the definition of a function named fscopy. This function can be safely passed two fstream objects, one opened for reading,

the other for writing. Assume that the input source is a text file consisting of a sequence of newline character-terminated lines. The function simply copies, line by line, the entire content of the data source associated with the first argument to the data target associated with the second argument. No value is returned.
Computers and Technology
1 answer:
diamong [38]3 years ago
6 0

Question:

Write the definition of a function named fscopy that does a line-by-line copy from one stream to another. This function can be safely passed two fstream objects, one opened for reading, the other for writing. In addition, it gets a bool argument that is true if the output lines are to be numbered, and another argument, an int that specifies line-spacing in the output.

Assume that the input source is a text file consisting of a sequence of newline character-terminated lines. The function copies, line by line, the entire content of the data source associated with the first argument to the data target associated with the second argument. It returns the number of lines read in. If it the third parameter, the bool is true, every line that is output is preceded by a 6-position field holding the line number (an integer) followed by a space and then the actual line. If the last argument, the int is 2 or more, it specifies the line spacing: for example, it is 3, there are two blank lines output after each line printed. These blank lines are NOT numbered.

Answer:

void fscopy(fstream &fsin, fstream &fsout)

{

string s;

getline(fsin, s, '\n');

while (!fsin.fail( ) )

{

fsout << s << endl;

getline(fsin, s, '\n');

}

}

You might be interested in
Each symbol of an octal number corresponds to 3 bits of a binary number. is it true or false​
grin007 [14]

Answer: True.

Explanation: It uses only the 3 bits to represent any digit in binary and easy to convert from octal to binary and then to vice-versa. Hope that helps

5 0
3 years ago
Think of an example in your life where a number could be described as data, information, and knowledge
zhannawk [14.2K]

Answer:

how many event you have been too in the last month (well non during this time but as an example)

Explanation:

4 0
3 years ago
You are a cleared employee. You discovered fraud and waste of money related to a classified program within your agency. If you r
Irina-Kira [14]

Answer:

A. True.

Explanation:

In this scenario, you are a cleared employee. You discovered fraud and waste of money related to a classified program within your agency. If you report this fraud and waste through appropriate channels, you may receive protection under the Presidential Policy Directive 19 (PPD-19): Protecting Whistleblowers with Access to Classified Information.

In USA, the Presidential Policy Directive 19 (PPD-19) which was signed by President Barack Obama in October 2012, is an executive order designed to provide significant protection for an employee who have access to classified informations such as fraud, waste of money and abuse or prohibiting any form of retaliation against this cleared employee.

3 0
3 years ago
For a Know Simple query, a Fully Meets rating can be given if the result does not display the answer, but it is at the very top
tekilochka [14]

Answer:

For a Know Simple query, a Fully Meets rating can be given if the result does not display the answer, but it is at the very top of the landing page.

B) False

Explanation:

  • A know simple query is special form of a know query. The query which are intended to know something like what is the length of pitch of a cricket ground?
  • A know simple query is such a know query that can be described in very little amount of words.
  • A know simple query would only get the fully meet ratings if the result shown has the result in a special result block or it is shown upfront. You don't need to open a link to get the answer in such scenario.

6 0
3 years ago
What is line-level?
Hunter-Best [27]

The maximum strength that an audio signal can be used is line-level.

A. The maximum strength that an audio signal can be.

<u>Explanation:</u>

Line level can be defined as a specified level indicating the strength of an audio signal which transmits analog sound between audio components such as CD players, DVD players, television sets and many more. Usually utilized Voltage and Audio Levels.

A line input level electrical sign ordinarily has a voltage running from 0,3 to 2 Volts, while a receiver level sign is all the more frequently in the range from 5 to 50 mV (millivolts). Most video editors concur that the general sound degree of your sound blend (the entirety of your sound consolidated) ought to be standardized between - 10db to - 20db.

3 0
3 years ago
Other questions:
  • One of the earlier applications of crypto-graphic hash functions was the storage of passwords to authenticate usersin computer s
    13·1 answer
  • 1. Grade data is:
    5·1 answer
  • Alcohol is a gateway drug. true or false?
    13·2 answers
  • I need help plzzzzzzzz
    10·2 answers
  • Ethics is a way of behaving so that you are
    7·2 answers
  • ___________ is a document that describes the locations of variables in the data file and lists the assignments of codes to the a
    12·1 answer
  • Assume the availability of a function named oneMore. This function receives an integer and returns one more than its parameter.
    14·1 answer
  • Python is an example of a low level programming language true or false?​
    14·1 answer
  • What word can you type using only the left home row keys and the right reach keys?
    6·2 answers
  • What can a user modify on a business card using the Edit Business Card dialog box? Check all that apply.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!