Constructors and Destructors – MCQs

30 Score: 0 Attempted: 0/30 Subscribe
1. : What is a constructor in C++?





2. : What is the name of a constructor in a class?





3. : What is a destructor in C++?





4. : Which symbol is used to define a destructor?





5. : How many destructors can a class have in C++?





6. : Can a constructor be virtual in C++?





7. : Which of the following is true about a destructor?





8. : Which of the following is a type of constructor?





9. : What is a default constructor?





10. : When is a constructor executed?





11. : Can constructors be overloaded?





12. : What is the return type of a constructor?





13. : What happens if you don’t define a constructor?





14. : What is a parameterized constructor?





15. : Can destructors be overloaded?





16. : What is the purpose of a copy constructor?





17. : What is the syntax of a destructor for class Sample?





18. : Can a destructor have parameters?





19. : What does a copy constructor accept as a parameter?





20. : How many times is a destructor called for a single object?





21. : Which of the following statements is true about constructors?





22. : When is a destructor called in C++?





23. : What is the primary use of a destructor?





24. : What type of function is a constructor?





25. : Which constructor is used when a new object is created from an existing object?





26. : Can a constructor call another constructor in the same class?





27. : Which of the following can be virtual in C++?





28. : Which of the following calls a copy constructor?





29. : Which constructor is called if no arguments are passed during object creation?





30. : What is the function of a constructor with default arguments?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials