

MCQOPTIONS
Saved Bookmarks
This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
1. |
|
A. | If the file is opened for output operations and it already existed, no action is taken. |
B. | If the file is opened for output operations and it already existed, then a new copy is created. |
C. | If the file is opened for output operations and it already existed, its previous content is deleted and replaced by the new one. |
D. | None of the above |
E. | |
Answer» D. None of the above | |
2. |
|
A. | course |
B. | fine |
C. | Returns fine 2 letter or number from the entered word |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
3. |
Which is correct syntax ? |
A. | myfile:open ("example.bin", ios::out); |
B. | myfile.open ("example.bin", ios::out); |
C. | myfile::open ("example.bin", ios::out); |
D. | myfile.open ("example.bin", ios:out); |
Answer» C. myfile::open ("example.bin", ios::out); | |
4. |
Which of the following methods can be used to open a file in file handling? |
A. | Using Open ( ) |
B. | Constructor method |
C. | Destructor method |
D. | Both A and B |
Answer» E. | |
5. |
Which of these is the correct statement about eof() ? |
A. | Returns true if a file open for reading has reached the next character. |
B. | Returns true if a file open for reading has reached the next word. |
C. | Returns true if a file open for reading has reached the end. |
D. | Returns true if a file open for reading has reached the middle. |
Answer» D. Returns true if a file open for reading has reached the middle. | |
6. |
Which stream class is to only write on files ? |
A. | ofstream |
B. | ifstream |
C. | fstream |
D. | iostream |
Answer» B. ifstream | |