Write statements that declare inFile to be an ifstream variable and outFile to be an ofstream variable.

Answers

Answer 1
Answer:

Answer:

Following are the statement in the c++ language

ifstream inFile;  // declared a variable inFile

ofstream outFile;//declared a variable outFile

Explanation:

The  ifstream and ofstream  is the file stream object in the c++ Programming language .The ifstream file stream object is used for reading the contents from the file whereas the ofstream  file stream object is used for writting the contents into the file.

  • We can create the variable for the ifstream and ofstream These variable is used for reading and writing into the File.
  • Following are the syntax to create the ifstream variable and ofstream variable

        ifstream variablename;

        ofstream  variablename


Related Questions

Gabby needs to perform regular computer maintenace . whats should she do
Write out the base sequence that is added directly after the primer. In order for Moodle to correctly grade this question, write only the letters representing the bases, write your answer in 5' to 3' direction, and do not have any spaces between the letters and do not label the 5' and 3' ends.
Write a Java application that uses the Math class to determine the answers for each of the following: a. The square root of 37 b. The sine and cosine of 300c. The value of the floor, ceiling, and round of 22.8 d. The larger and the smaller of the character ‘D’ and the integer 71 e. A random number between 0 and 20 (Hint: The random() method returns a value between 0 and 1; you want a number that is 20 times larger.) Save the application as MathTest.java.'
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. Prompt the user for 12 months of highest and lowest. Write two methods : one to calculate and return the average high and one to calculate and return the average low of the year. These methods MUST be your original code. Your program should output all the values in the array and then output the average high and the average low.a) Function getData: This function reads and stores data in the two-dimensional array.b) Function averageHigh: This function calculates and returns the average high temperature for the year.c) Function averageLow: This function calculates and returns the average low temperature for the year.d) Function indexHighTemp: This function returns the index of the highest high temperature in the array.e) Function indexLowTemp: This function returns the index of the lowest low temperature in the array."
2. Use inheritance to create a hierarchy of Exception classes -- EndOfSentenceException, PunctuationException, and CommaException. EndOfSentenceException is the parent class to PunctuationException, which is the parent class to CommaException. Test your classes in a Driver class with a main method that asks the user to input a sentence. If the sentence ends in anything except a period (.), exclamation point (!), or question mark (?), the program should throw a PunctuationException. If the sentence specifically ends in a comma, the program should throw a CommaException. Use a catch block to catch all EndOfSentenceExceptions, causing the program to print a message and terminate. If a general PunctuationException is caught, the program should print "The sentence does not end correctly." If a CommaException is caught, the program should print "You can't end a sentence in a comma." If there are no exceptions, the program should print "The sentence ends correctly." and terminate.

________________________ is an information system that stores user data in many different geographical locations and makes that data available on demand.

Answers

Answer:

CDN(content delivery network)

Explanation:

Content delivery network(CDN) which can as well be regarded as Content Distribution Network helps in acheiving high website performance, it essential in reduction of latency, through making the time a request is made using a website to when the website is fully loaded to be short and Minimal. It important in a situation whereby there is traffic loads from the users as well as server. It should be noted that CDN

is an information system that stores user data in many different geographical locations and makes that data available on demand. CDN's usefulness is also found in Cloud computing network such as Software as a service(SaaS). Google doc is an example.

Which of these terms best describes the type of AI used in today’s email spam filters, speech recognition, and other specific applications?A. Artificial Narrow Intelligence (ANI)
B. Artificial General Intelligence (AGI)

Answers

The term that is described in the question is A. Artificial Narrow Intelligence.

Artificial intelligence simply means the ability of a computer system to automatically make decisions based on the input value received.

Artificial Narrow Intelligence is the computer's ability to do a single task well. It's used in today’s email spam filters, speech recognition, and other specific applications.

Read related link on:

brainly.com/question/16439202

Answer:

A. Artificial Narrow Intelligence.

Explanation:

Artificial intelligence is the ability of a computer system, with the help of programming, automatically make decisions as humanly as possible, based on the input value received. There are three types of artificial intelligence, namely, artificial narrow intelligence (ANI), artificial general intelligence (AGI) and artificial super intelligence (ASI).

ANI is focus on executing one specific task extremely well like web crawler, speech recognition, email spam filters etc. AGI is meant to handle human intellectual task, while ASI performs task beyond human intellect.

Allows an administrator to query a dns database and find the host name associated with a specific ip address or

Answers

  Or a domain name.   Good Luck!

What component can be used for user input or display of output?JButton
JLabel
JTextField
JFrame

Answers

Answer:

JTextField

Explanation:

JTextField is a Swing control which can be used for user input or display of output. It corresponds to a textfield and can be included with other controls such as JLabel, JButton,JList etc. on a comprehensive user interface which is application dependent. JTextField supports a read-write mode where the user can enter a value and it also supports a read-only mode which can be used to display non-editable output to the user.

What are the two types of vertical spacing for paragraphs

Answers

The vertical space you define above or under the sides of your paragraphs

5. convertToUpper - Given an input string, the function converts all alphabetic characters to uppercase. Write the new string into an output file called Upper.txt and return true. If the input string is empty just return false. The function header is: bool convertToUpper(const string & st)

Answers

Answer:

#include <iostream>

#include <cstring>

#include <fstream>

using namespace std;

bool convertToUpper(const string &st);

int main()

{

string s;

cout << "Enter the string: " << endl;

getline(cin, s);

convertToUpper(s);

return 0;

}

bool convertToUpper(const string &st) {

if(st.length() == 0) {

return false;

} else {

ofstream myfile;

myfile.open ("Upper.txt");

for(int i=0;i<st.length();i++) {

if(st[i]>='a' && st[i]<='z') {

myfile << (char)toupper(st[i]);

} else {

myfile <<st[i];

}

}

myfile.close();

}

 

}

Other Questions