⟩ Why 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.
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
How many times a constructor is called in the life-time of an object? A. Only once B. Twice C. Thrice D. Depends on the way of creation of object
Which of the following statement is incorrect? A. Constructor is a member function of the class. B. The compiler always provides a zero argument constructor. C. It is necessary that a constructor in a class should always be public. D. Both B and C.
Copy constructor must receive its arguments by __________ . A. either pass-by-value or pass-by-reference B. only pass-by-value C. only pass-by-reference D. only pass by address
When are the Global objects destroyed? A. When the control comes out of the block in which they are being used. B. When the program terminates. C. When the control comes out of the function in which they are being used. D. As soon as local objects die.
Which of the following implicitly creates a default constructor when the programmer does not explicitly define at least one constructor for a class? A. Preprocessor B. Linker C. Loader D. Compiler