What happens if you try to open a file that does not exist in C++ without specifying any flags?
A. The file will be created
B. An error will occur
C. The program will wait indefinitely
D. The file will be opened in read mode
Answer: Option B
A. The file will be created
B. An error will occur
C. The program will wait indefinitely
D. The file will be opened in read mode
Answer: Option B
Which header file is required for file handling in C++?
A. <iostream>
B. <fstream>
C. <file>
D. <filestream>
Join The Discussion