Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. What will happen when the handler is not found for an exception?
Correct Answer is : L prefix
2. What will happen when we move to try block far away from catch block?
Correct Answer is : To initialize the data members of an object when it is created
3. What will happen if an exception that is thrown may cause a whole load of objects to go out of scope?
Correct Answer is : All of the mentioned
4. What operation can be performed by destructor?
Correct Answer is : Error
5. What is the main purpose of the constructor?
Correct Answer is : 3
6. Which type of program is recommended to include in try block?
Correct Answer is : To destroy an object when the lifetime of an object ends
7. Which statement is used to catch all types of exceptions?
Correct Answer is : ~A(){}
8. Which of the following is used to create an output stream?
Correct Answer is : A a = A(5);
9. Which of the following is used to create a stream that performs both input and output operations?
Correct Answer is : All of the mentioned
10. Which of the following is not used as a file opening mode?
Correct Answer is : All of the mentioned
11. Which of the following statements are correct?
1) It is not possible to combine two or more file opening mode in open() method.
2) It is possible to combine two or more file opening mode in open() method.
3) ios::in and ios::out are input and output file opening mode respectively.
Correct Answer is : Error
12. By default, all the files in C++ are opened in _________ mode.
Correct Answer is : Nothing printed
13. What is the use of ios::trunc mode?
Correct Answer is : 1010
14. Which of the following is the default mode of the opening using the ofstream class?
Correct Answer is : Compile time error
15. What is the return type open() method?
Correct Answer is : 10
16. Which of the following is not used to seek file pointer?
Correct Answer is : Nothing printed
17. Which of the following is the default mode of the opening using the ifstream class?
Correct Answer is : Constructor called
18. Which operator is used to insert the data into file?
Correct Answer is : No chance for destructor overloading
19. Which function is used to position back from the end of file object?
Correct Answer is : Destructors can be virtual
20. How many objects are used for input and output to a string?