Which function is used to open a file in C++? 

  • openFile() 
  • create() 
  • open() 
  • initiateFile()
The open() function is used in C++ to open a file. It is a member function of the file stream classes (like fstream, ifstream, ofstream). By providing the filename and mode, a user can access or modify the contents of a file.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *