The function _______ is used to close a file.
- fstream
- read
- close
- write
The close function is used in conjunction with file streams in C++ to close an open file. It's crucial to close files after operations to release system resources and ensure that all changes, if any, are flushed and saved appropriately to the file system.
Loading...
Related Quiz
- What does the new operator do in C++?
- Unlike if-else, switch-case in C++ does not support _______ type for case values.
- The _______ keyword is used when we want to explicitly pass by reference but prevent the function from modifying the argument.
- To prevent memory leaks, every call to new should be matched with a call to _______.
- In C++ STL, the function _______ is used to remove consecutive duplicate elements in a range.