- Home
- Placement
- Programming
- Consructors and Destructors
- Array
- Data Types
- Functions
- Loop & Control Statements
- Operators & Expressions
- Pointer
- Preprocessor
- Storage Classes
- Structure & Union
- Variables & Constants
- Classes and Objects
- Consructors and Destructors
- Exception handling
- File Handling
- Function Overloading
- Inheritance
- Operator Overloading
- Polymorphism
- Templates
C Language
C++ language
JAVA
-
-
( 1 ) Which of the following is not the characteristic of constructor.
- 1) They should be declared in the public section.
- 2) They do not have return type.
- 3) They can not be inherited.
- 4) They can be virtual.
-
Show Answer Report Discussion in forumAnswer : 4) They can be virtual.
Solution :
discussion
Answer : 4) They can be virtual.
-
-
-
( 2 ) Which of the following statement is correct?
- 1) A constructor is called at the time of declaration of an object
- 2) A constructor is called at the time of use of an object.
- 3) A constructor is called at the time of declaration of a class.
- 4) A constructor is called at the time of use of a class.
-
Show Answer Report Discussion in forumAnswer : 1) A constructor is called at the time of declaration of an object
Solution :
discussion
Answer : 1) A constructor is called at the time of declaration of an object
-
-
-
( 3 ) Destructors are called
- 1) in the same order of constructor calls
- 2) in the reverse order of constructor calls
- 3) in any random order
- 4) None of these
-
Show Answer Report Discussion in forumAnswer : 2) in the reverse order of constructor calls
Solution :
discussion
Answer : 2) in the reverse order of constructor calls
-
-
-
( 4 ) The explicit keyword is an optional decoration for the constructors that takes exactly_____argument.
- 1) No argument
- 2) Two
- 3) Three
- 4) One
-
-
-
( 5 ) Which of the following statement is correct whenever an object goes out of scope?
- 1) The default constructor of the object is called.
- 2) The parameterized destructor is called.
- 3) The default destructor of the object is called.
- 4) None of these
-
Show Answer Report Discussion in forumAnswer : 3) The default destructor of the object is called.
Solution :
discussion
Answer : 3) The default destructor of the object is called.
-
-
-
( 6 ) The antonym of constructor is
- 1) Creator
- 2) Destructor
- 3) Destroyer
- 4) None of these
-
Show Answer Report Discussion in forumAnswer : 2) Destructor
Solution :
discussion
Answer : 2) Destructor
-
-
-
( 7 ) Destructor has the same name as the constructor and it is preceded by ______
- 1) ?
- 2) ~
- 3) &
- 4) *
-
-
-
( 8 ) Explicit call to a constructor means
- 1) Providing the constructor name explicitly to invoke it
- 2) Not providing the construction name at all
- 3) Is the shorthand method
- 4) None of these
-
Show Answer Report Discussion in forumAnswer : 1) Providing the constructor name explicitly to invoke it
Solution :
discussion
Answer : 1) Providing the constructor name explicitly to invoke it
-
-
-
( 9 ) Destructors __________ for automatic objects if the program terminates with a call to function exit or function abort.
- 1) are called
- 2) are inherited
- 3) are not called
- 4) are created
-
Show Answer Report Discussion in forumAnswer : 3) are not called
Solution :
discussion
Answer : 3) are not called
-
-
-
( 10 ) A destruction function
- 1) Takes no argument and has no return type not even void
- 2) Has name similar to that of class, preceded by tilde(~) symbol
- 3) Is used to destruct an object, constructed through constructor function
- 4) All of the above
-
Show Answer Report Discussion in forumAnswer : 4) All of the above
Solution :
discussion
Answer : 4) All of the above
-