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
Vinil7 [7]
3 years ago
7

A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code.

Computers and Technology
2 answers:
lapo4ka [179]3 years ago
8 0

Answer:

The answer is 3

Explanation:

Edge 2021.

kirill115 [55]3 years ago
3 0

Answer:

2 lines

Explanation:

The "w" flag will overwrite any content, so the existing 80 lines are lost.

Then, if you write two lines, there are two lines in the file.

You could argue that the final newline character causes a third line to be present, but logically, there are two lines.

You might be interested in
Word wrap is the same as __________ return and means you let the ______________ control when it will go to a new line.
dusya [7]

Word wrap is the same as; Soft Return

Word wrap means that you let the; Computer Control when it will go to a new line

<h3>What is Text Wrapping?</h3>

Text wrapping is simply defined as a process used in MS Word to Wrap a Text around an Image.

Now, the way it is done is by selecting the image you want to wrap text around and then On the Format tab, click the Wrap Text command in the Arrange group, then select the desired text wrapping option to wrap the text.

Finally Word wrap is also same as using soft return and letting the computer control when it goes to the next line.

Read more about text wrapping at; brainly.com/question/5625271

5 0
2 years ago
What is a boot sector
Neporo4naja [7]

Explanation:

A boot sector is the sector of a persistent data storage device which contains machine code to be loaded into random-access memory and then executed by a computer system's built-in firmware. Usually, the very first sector of the hard disk is the boot sector, regardless of sector size and partitioning flavor.

4 0
2 years ago
2.3.<br> Why is a foundation of particular importance when building and designing<br> structures?
bearhunter [10]

Answer:

A foundation plays three major roles in the construction of a structure. A good and strong foundation keeps the building standing while the forces of nature wreak havoc. Well-built foundations keep the occupants of the building safe during calamities such as earthquake, floods, strong winds etc.

6 0
3 years ago
Write a program that lets the user enter the total rainfall for each of 12 months (starting with January) into an array of doubl
lianna [129]

Answer:

The C++ code is given below with appropriate comments

Explanation:

#include "stdafx.h"

//Header file section

#include <iostream>

#include <iomanip>

#include <string>

using namespace std;

//Function prototypes

double rainfallTotal(double[], int);

double averageMonthlyRainfall(double[], int);

double highestAmountRainfall(double[], int, int &);

double lowestAmountRainfall(double[], int, int &);

int main()

{

//Initialize variables

const int ALL_MONTHS = 12;

int highIndex = 0;

int lowIndex = 0;

//Declare variables

double totalRf;

double averageRf;

double mostRf;

double leastRf;

double monthlyRf[ALL_MONTHS];

string monthName[ALL_MONTHS] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };

for (int i = 0; i < ALL_MONTHS; i++)

{

 cout << "Enter rainfall for " << monthName[i] << ": ";

 cin >> monthlyRf[i];

 // Check the input as negative numbers

 //for monthly rainfall

 while (monthlyRf[i] < 0)

 {

  cout << "Invalid data (negative rainfall) " << endl;

  cout << "Retry the rainfall in " << monthName[i] << ": ";

  cin >> monthlyRf[i];

 }

}

//Call the methods

totalRf = rainfallTotal(monthlyRf, ALL_MONTHS);

averageRf = averageMonthlyRainfall(monthlyRf, ALL_MONTHS);

mostRf = highestAmountRainfall(monthlyRf, ALL_MONTHS, highIndex);

leastRf = lowestAmountRainfall(monthlyRf, ALL_MONTHS, lowIndex);

//Display output

cout << fixed << showpoint << setprecision(2) << endl;

cout << "Total rainfall: " << totalRf << endl;

cout << "Average rainfall: " << averageRf << endl;

cout << "Least rainfall in " << monthName[lowIndex] <<endl;

cout << "Most rainfall in " << monthName[highIndex] <<endl;

system("pause");

return 0;

}

//Method definition of rainfallTotal

double rainfallTotal(double totalRainfall[], int n)

{

double total = 0;

for (int i = 0; i < n; i++)

 total += totalRainfall[i];

return total;

}

//Method definition of averageMonthlyRainfall

double averageMonthlyRainfall(double totalRainfall[], int n)

{

double average = 0.0;

double total = 0;

for (int i = 0; i < n; i++)

 total += totalRainfall[i];

average = total / n;

return average;

}

//Method definition of lowestAmountRainfall

double lowestAmountRainfall(double totalRainfall[], int n, int &monthIndex)

{

double least;

int i = 0;

least = totalRainfall[i];

while (i < n)

{

 if (totalRainfall[i] < least)

 {

  least = totalRainfall[i];

  monthIndex = i;

 }

 i++;

}

return least;

}

//Method definition of highestAmountRainfall

double highestAmountRainfall(double totalRainfall[], int n, int &monthIndex)

{

double high;

int i = 0;

high = totalRainfall[i];

while (i < n)

{

 if (totalRainfall[i] > high)

 {

  high = totalRainfall[i];

  monthIndex = i;

 }

 i++;

}

return high;

}

3 0
2 years ago
A class is designed with two public attributes: attributeOne and attributeTwo. attributeOne is an integer data type while attrib
nexus9112 [7]

Answer:

B. void setAttributeOne(int newAttributeOne)

{

attributeOne = newAttributeOne

}

Explanation:

The class has two public attributes : int attributeOne and String attributeTwo.

The appropriate setters for these attributes will be as follows:

void setAttributeOne(int newAttributeOne)

{

attributeOne = newAttributeOne ;

}

void setAttributeTwo(int newAttributeTwo)

{

attributeTwo = newAttributeTwo;

}

The highlighted code corresponds to option B among the given options. So option B is the correct setter for attributeOne.

4 0
3 years ago
Other questions:
  • Q1: what is significant about the contents of the destination address field?
    12·2 answers
  • . public members are accessible from ________________ where the object is visible
    9·1 answer
  • I need 3 sentences on adware.<br> What they do and how they are a risk.
    5·1 answer
  • I make a budget of my 1st Gamer PC its good?
    9·1 answer
  • Ivan wants to have code in a game that will make it possible to change the speed of a swimmer in the game. Which of these does I
    8·1 answer
  • Which one way in which using infrared in game console controllers could affect the experience of a person playing the game?
    8·1 answer
  • In this exercise, you will write a class that represents how you spend your time during the week The class should have four doub
    6·1 answer
  • Please i relly need this! ​
    11·1 answer
  • Some of y'all make me lose braincells with your questions
    10·2 answers
  • A new president has been elected. She promises to lower taxes drastically. What is most LIKELY to happen as a result of this dec
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!