Ask Question

Write a few statements that open a file called "greeting", write the message "hey!" to the file - - and then close it. declare any variables needed.

+2
Answers (1)
  1. 28 January, 19:58
    0
    C++:

    int main () {

    std::ofstream output {"greeting. txt"};

    output << "hey!";

    output. close ();

    return 0;

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a few statements that open a file called "greeting", write the message "hey!" to the file - - and then close it. declare any ...” 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