JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
C++ interview questions part 27
C++ interview questions part 27
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. When exceptions are used?
A. A function is limited to throwing only a specified list of exceptions
B. A catch can catch all types of exceptions
C. A function can throw any type of exceptions
D. None of the mentioned
Show Correct Answer
Correct Answer is :
A function is limited to throwing only a specified list of exceptions
2. What is the user-defined header file extension in c++?
A. A function can throw any type of exceptions
B. A function can throw an exception of certain type only
C. A function can’t throw any type of exception
D. None of the mentioned
Show Correct Answer
Correct Answer is :
A function can throw an exception of certain type only
3. Which of the following keyword is used to declare the header file?
A. terminate
B. arise an error
C. run
D. none of the mentioned
Show Correct Answer
Correct Answer is :
arise an error
4. Identify the incorrect statement.
A. In empty()
B. Will throw an int
C. Caught an int
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
5. What does a default header file contain?
A.
B. Exception:bad_alloc
C. Exception:std:bad_typeid
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Exception:std:bad_typeid
6. setprecision requires which of the following header file?
A. Can’t do the dynamic_cast lor!!!
B. Caught: bad_cast exception. Myshape is not mytriangle.
C. Can’t able to create the dynamic instance for the triangle, So it is arising an exception
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Can’t able to create the dynamic instance for the triangle, So it is arising an exception
7. Which of the following header file does not exist?
A. 4
B. 2
C. bad_alloc
D. depends on compiler
Show Correct Answer
Correct Answer is :
depends on compiler
8. Which of the header file must be included to use stringstream?
A. It throws nothing
B. It can throw anything
C. It can catch anything
D. None of the mentioned
Show Correct Answer
Correct Answer is :
It can throw anything
9. Which of the following header files is required for creating and reading data files?
A. Operations which are reversible
B. Operations which are irreversible
C. Operations which are static
D. Operations which are dynamic
Show Correct Answer
Correct Answer is :
Operations which are irreversible
10. What is meant by heap?
A. catch
B. throw
C. try
D. none of the mentioned
Show Correct Answer
Correct Answer is :
try
11. Which value is pointed out first in heap?
A. error
B. program will execute
C. block of that code will not execute
D. none of the mentioned
Show Correct Answer
Correct Answer is :
error
12. Which operator is used to compare the elements in heap?
A. 0
B. error:Positive Number Required
C. compile time error
D. none of the mentioned
Show Correct Answer
Correct Answer is :
0
13. How to protect the heap from affecting the memory?
A. Allocated successfully
B. Error allocating the requested memory
C. Depends on the memory of the computer
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Depends on the memory of the computer
14. In what form does the STL provides heap?
A. calls the standard library function terminate()
B. raise an error
C. executes the remaining block
D. none of the mentioned
Show Correct Answer
Correct Answer is :
calls the standard library function terminate()
15. How many types are there in binary heaps?
A. Reduces the amount of code in cache
B. Increases the amount of code in cache
C. Don’t alter anything
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Reduces the amount of code in cache
16. Which operator works only with integer variables?
A. Terminate the program
B. Produce a runtime error
C. It will be added to the overhead
D. None of the mentioned
Show Correct Answer
Correct Answer is :
It will be added to the overhead
17. How many types are there in increment/decrement operator?
A. Abort the program
B. Resource cleanup
C. Exit from the current block
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Resource cleanup
18. Pick out the correct statement
A. Begin the execution of class
B. Include the macros for the program
C. Establish the class invariant
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Establish the class invariant
19. Which concepts does the Pre Increment use?
A. Exception object is created only if an error actually happens
B. Because of execution time
C. Memory space involved in creating an exception object
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Exception object is created only if an error actually happens
20. What is Inheritance in C++?
A. catch handler
B. handler
C. exception handler
D. none of the mentioned
Show Correct Answer
Correct Answer is :
exception handler
Similar Interview Questions
Search for latest jobs
Find Jobs