Ask Question
8 November, 19:46

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.

+5
Answers (1)
  1. 8 November, 23:04
    0
    C++:

    int main () {

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

    output << "hey!";

    output. close ();

    return 0;

    }
Know the Answer?
Not Sure About the Answer?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers