Ask Question

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

+3
Answers (1)
  1. 22 May, 00:10
    0
    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
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write statements that declare inFile to be an ifstream variable and outFile to be an ofstream variable. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers