Question 1 of 25
Hints left: 3
Q1
Which file mode is used to open a file for reading only in C++?
Q2
What is the primary reason for using virtual functions in C++?
Q3
Which file mode is used to open a file for reading and writing in C++?
Q4
What is the function used to create a new file in C++?
Q5
Which function is used to get the current position of the file pointer in C++?
Q6
What is the function used to write data to a file in C++?
Q7
Which of the following is not a file stream class in C++?
Q8
Which type of polymorphism is not supported in C++?
Q9
How do you create a new file in C++?
Q10
How do you check if a file has been successfully opened in C++?
Q11
What is the function used to open a file in C++?
Q12
What is the correct syntax for writing data to a file in C++?
Q13
In C++, can you declare a constructor as virtual?
Q14
How can you achieve polymorphism in C++?
Q15
Which of the following is used to read data from a file in C++?
Q16
Which header file is required for file handling in C++?
Q17
How do you close a file in C++?
Q18
Which function is used to delete a file in C++?
Q19
Which mode is used to open a file for writing in C++?
Q20
What does the seekg() function do in C++ file handling?
Q21
How do you check if a file exists before opening it in C++?
Q22
How do you check if the end of a file has been reached in C++?
Q23
Which function is used to check if a file exists in C++?
Q24
What is the result of attempting to instantiate an object of an abstract class in C++?
Q25
What is the purpose of the ios::app flag in C++ file handling?