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
damaskus [11]
3 years ago
15

Write an application that displays the sizes of the files lyric1.txt and lyric2.txt in bytes as well as the ratio of their sizes

to each other.
Computers and Technology
1 answer:
viva [34]3 years ago
4 0

Answer:

#include<iostream>

#include<fstream>

using namespace std;

int main() {

  ifstream file_one("lyric1.txt", ios::binary);

  ifstream file_two("lyric2.txt", ios::binary);

  file_one.seekg(0, ios::end);  // retrieving file size of lyric1.txt file

  file_two.seekg(0, ios::end);  // retrieving file size of lyric2.txt file

  // converting the binary file size to an integer.

  int fileOne = file_one.tellg();

  int fileTwo = file_two.tellg();

  cout<<"Size of the lyric1.txt is"<<" "<< fileOne<<" "<<"bytes";

  cout<<"Size of the lyric2.txt is"<<" "<< fileTwo<<" "<<"bytes";

  cout<< fileOne <<" : "<< fileTwo;

Explanation:

The source code gets the file size of two word files and displays them in bytes and also displays the ratio of both files.

You might be interested in
Which of the following is NOT a good idea to do after you change the root password?
s344n2d4d5 [400]

Answer:

C) Keep the change password file on the server in case you need to change the password again

8 0
3 years ago
Because a chart is _______, it can be dragged to another area of the worksheet.
Margarita [4]

Because a chart is a graphic, it can be dragged to another area of the worksheet. Correct answer: D To move a chart within a worksheet, drag the chart to the desired location. A chart is a graphical representation of data. The purpose of the chart is to better understand and predict current and future data.

6 0
3 years ago
What is the password based off of the clues
nevsk [136]

Answer:

i would say Plane, if not then Plane then the person's birthdate.

Explanation:

3 0
2 years ago
Which online article citation is correctly formatted according to MLA standards?
atroni [7]

Answer:

A is the answer

Explanation:

Hope this helps!! Please consider marking brainliest!!!

6 0
3 years ago
Read 2 more answers
2.7 code practice question 1 edhesive
Virty [35]

I will edit this if you edit your question..

Im confused. This is not a question..

8 0
4 years ago
Read 2 more answers
Other questions:
  • I was not supposed to upgrade my iPad to iOS 11 due to testing but it automatically did when I was charging it. Is there a way t
    11·1 answer
  • Unlike the String class where you must pass a message to an object (instance) of the class, as in x.length( ), in order to use t
    5·1 answer
  • Describe a strategy for avoiding nested conditionals. Give your own example of a nested conditional that can be modified to beco
    15·1 answer
  • An administrator has several cables plugged into a patch panel and needs to determine which one comes from a specific port. Whic
    15·1 answer
  • When installing a device driver, start the computer in
    6·1 answer
  • Which of the following is an example of the rewards &amp; consequences characteristic of an organization?
    10·2 answers
  • Are you familiar with measuring using a ruler? When have you ever used a ruler to measure, and who taught you how to use the rul
    13·1 answer
  • The current in a resistor is 5.0 A, and its power is 60 W. What is the voltage?
    12·2 answers
  • Which is not and input device , keyboard , joystick, Monitor, Microphone​
    10·2 answers
  • In your own view, how can social media be used in teaching and learning in higher education?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!