logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • A special member function of a class, which is invoked automatically whenever an object goes out of the scope is called


  • Options
  • A. Constructor
  • B. Destructor
  • C. Friend function
  • D. None of the above

  • Correct Answer
  • Destructor 

    Explanation

    Destructor is a special member function of a class, which is invoked automatically whenever an object goes out of the scope. It has the same name as its class with a tilde character prefixed.

  • Tags: Software Architect

    Technology problems


    Search Results


    • 1. What do you mean by inline function?
    • Discuss
    • 2. What is the user-defined header file extension in c++?

    • Options
    • A. cpp
    • B. h
    • C. hf
    • D. none of these
    • Discuss
    • 3. What is the general syntax for accessing the namespace variable?

    • Options
    • A. namespaceid::operator
    • B. namespace,operator
    • C. namespace#operator
    • D. none of the mentioned
    • Discuss
    • 4. What is the use of Namespace?

    • Options
    • A. To encapsulate the data
    • B. To structure a program into logical units.
    • C. Both a and b
    • D. none of these
    • Discuss
    • 5. How many types of macros are there in c++?

    • Options
    • A. 1
    • B. 2
    • C. 3
    • D. 4
    • Discuss
    • 6. Which of the following can derived class inherit?

    • Options
    • A. members
    • B. functions
    • C. both a & b
    • D. None of the above
    • Discuss
    • 7. What is meant by pure virtual function?

    • Options
    • A. Function which does not have definition of its own.
    • B. Function which does have definition of its own.
    • C. Function which does not have any return type.
    • D. None of the mentioned
    • Discuss
    • 8. What does inheriatance allows you to do?

    • Options
    • A. create a class
    • B. access methods
    • C. create a hierarchy of classes
    • D. None of the mentioned
    • Discuss
    • 9. How many types of constructor are there in C++?

    • Options
    • A. 1
    • B. 2
    • C. 3
    • D. 4
    • Discuss
    • 10. What is a template?

    • Options
    • A. A template is a formula for creating a generic class
    • B. A template is used to manipulate the class
    • C. A template is used for creating the attributes
    • D. none of the mentioned
    • Discuss


    Comments

    There are no comments.

Enter a new Comment