⟩ Why does COM need GUIDs?
A globally unique identifier (GUID) is used for unique IDs. No two GUIDs are the same no matter what computer they were generated on. The attribute clsid defines the GUID of the associated ActiveX control to use.
A globally unique identifier (GUID) is used for unique IDs. No two GUIDs are the same no matter what computer they were generated on. The attribute clsid defines the GUID of the associated ActiveX control to use.
What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor? A. Compile-time error. B. Preprocessing error. C. Runtime error. D. Runtime exception.
A constructor that accepts __________ parameters is called the default constructor. A. one B. two C. no D. three
Destructor has the same name as the constructor and it is preceded by ______ . A. ! B. ? C. ~ D. $
Which of the following statement is correct? A. A constructor of a derived class can access any public and protected member of the base class. B. Constructor cannot be inherited but the derived class can call them. C. A constructor of a derived class cannot access any public and protected member of the base class. D. Both A and B.
Destructors __________ for automatic objects if the program terminates with a call to function exit or function abort. A. are called B. are inherited C. are not called D. are created
A class's __________ is called when an object is destroyed. A. constructor B. destructor C. assignment function D. copy constructor
Which of the following statements are correct? A. Constructor is always called explicitly. B. Constructor is called either implicitly or explicitly, whereas destructor is always called implicitly. C. Destructor is always called explicitly. D. Constructor and destructor functions are not called at all as they are always inline.
For automatic objects, constructors and destructors are called each time the objects A. enter and leave scope B. inherit parent class C. are constructed D. are destroyed
Which of the following statement is correct? A. Constructor has the same name as that of the class. B. Destructor has the same name as that of the class with a tilde symbol at the beginning. C. Both A and B. D. Destructor has the same name as the first member function of the class.
Which constructor function is designed to copy objects of the same class type? A. Create constructor B. Object constructor C. Dynamic constructor D. Copy constructor