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
My name is Ann [436]
2 years ago
9

Assuming dataFile is an ofstream object associated with a disk file named payroll.dat, which of the following statements would w

rite the value of the salary variable to the file
A) cout < B) ofstream C) dataFile << salary;
D) payroll.dat <
Computers and Technology
1 answer:
svet-max [94.6K]2 years ago
8 0

Answer:

dataFile << salary;

Explanation:

To write salary to a file (payroll.dat) using ofstream, you make use of the following instruction:

<em>ofstream dataFile; </em>

<em>myfile.open ("payroll.dat"); </em>

<em>myfile <<salary; </em>

<em>myfile.close();</em>

<em />

This line creates an instance of ofstream

<em>ofstream dataFile; </em>

This line opens the file payroll.dat

<em>myfile.open ("payroll.dat"); </em>

This is where the exact instruction in the question is done. This writes the value of salary to payroll.dat

<em>myfile <<salary; </em>

This closes the opened file

<em>myfile.close();</em>

<em />

<em />

You might be interested in
lance measured 0.485 liter of water. Angel measured 0.5 liter of water. lance said, "My beaker has more water than yours because
nikdorinn [45]
No, if we were to make the decimal for angel it would be 0.500 which is more than lance, you can also round them
4 0
3 years ago
Read 2 more answers
What are your undertale + au ships?
fenix001 [56]
What is an undertale? Lol
3 0
3 years ago
A drink costs 3 dollars. A pizza costs 6 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 2 dr
steposvetlana [31]

I think it's correct

.

.

.

.

.

.

.

.

.

5 0
2 years ago
How to calculate 3 X (50 + 40) ÷ 5 on excel 2016
kozerog [31]

Answer:

I think this might help, don't know much of this

Explanation:

How do you calculate 3.5 increase in Excel?

How To Increase a Number By a Percentage. If want to calculate a percentage increase in Excel (i.e. increase a number by a specified percentage), this can be done by simply multiply the number by 1 + the percentage increase. - which gives the result 60.

8 0
3 years ago
Read 2 more answers
Assume that the client wants to retrieve the www.cnn home page but has no information about the www.cnn web server IP address. D
liberstina [14]

Answer:

You could type<em> ipconfig www.cnn</em> in command promt.

Explanation:

4 0
2 years ago
Other questions:
  • Explain why blocking ping (ICMP echo request) packets at an organization's edge router is not an effective defense against ping
    11·1 answer
  • Which type of security threat installs to a computer without the user's knowledge and then monitors all computer activity?
    12·2 answers
  • Will an email sent from a phone say it was sent from your phone
    5·2 answers
  • Budgets help you to do all of the following expect
    15·2 answers
  • With the ease of the Internet, it is not uncommon for individuals to copy skills from resume templates to make themselves look m
    9·1 answer
  • What is a unique text-based Internet address corresponding to a computer's unique numeric IP address called
    14·1 answer
  • Columns are labeled with letters and Rows are labeled with numbers.
    5·1 answer
  • When looking at aggregated logs, you are seeing a large percentage of Windows hosts connecting to an Internet Protocol (IP) addr
    5·1 answer
  • Wha are the types of slide show? define​
    10·1 answer
  • Match the TCP/IP Layer to a problem that can happen there.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!