Object Oriented Programming interview questions part 18

Object Oriented Programming interview questions part 18

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. What is the sequence of destructors call?

Correct Answer is : Revere of the order of constructor call

2. The destructors _____________________

Correct Answer is : Can’t have any argument

3. Destructor calls ________________ (C++)

Correct Answer is : Can be implicit or explicit

4. Number of destructors called are

Correct Answer is : Always equal to number of constructors called

5. For explicit call _________________

Correct Answer is : The destructor must be public

6. If a class have 4 constructors then it must have 4 destructors also.

Correct Answer is : FALSE

7. Which among the following is true for destructors?

Correct Answer is : Destructors can’t be overloaded

8. The constructor _____________

Correct Answer is : Doesn’t have a return type

9. The destructors ____________

Correct Answer is : Doesn’t have a return type

10. The destructor can be called before the constructor if required. (True/False)

Correct Answer is : FALSE

11. What is extern variable?

Correct Answer is : Variables to be used that are declared in another source file

12. Which among the following is a correct statement for variables?

Correct Answer is : Variable can be declared many times

13. Which among the following is true for the variables?

Correct Answer is : Variable can be defined only once

14. To use extern variable _____________________

Correct Answer is : The source file must be included in the new file

15. What does a header file contain for an extern variable?

Correct Answer is : Only declaration of variables

16. Which condition is true if extern variable is used in a file?

Correct Answer is : Only one header file should declare it

17. Whenever a function is declared in a program _____________________

Correct Answer is : function is extern by default

18. Which of the following results in allocation of memory for the extern variables?

Correct Answer is : Definition

19. Which is the correct syntax for extern variable declaration?

Correct Answer is : extern data_type variable_name;

20. Which is the correct syntax for extern function declaration?

Correct Answer is : extern return_type function_name(argument_list);

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon