Exam
Adept.com
Home
About Us
Contact
🏠 Home
Constructors And Destructors
Constructors And Destructors
Exercise: Constructors And Destructors
📂 Constructors And Destructors
✅
Questions for: Constructors And Destructors
Which of the following statement is correct whenever an object goes out of scope?
A:
The default constructor of the object is called.
B:
The parameterized destructor is called.
C:
The default destructor of the object is called.
D:
None of the above.
Answer:
C
No answer description is available.
Let's discuss.
Discuss About this Question.
Post
Which of the following statement is correct about constructors?
A:
A constructor has a return type.
B:
A constructor cannot contain a function call.
C:
A constructor has no return type.
D:
A constructor has a void return type.
Answer:
C
No answer description is available.
Let's discuss.
Discuss About this Question.
Post
To ensure that every object in the array receives a destructor call, always delete memory allocated as an array with operator __________ .
A:
destructor
B:
delete
C:
delete[]
D:
kill[]
Answer:
C
No answer description is available.
Let's discuss.
Discuss About this Question.
Post
Which of the following gets called when an object is being created?
A:
constructor
B:
virtual function
C:
destructor
D:
main
Answer:
A
No answer description is available.
Let's discuss.
Discuss About this Question.
Post
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
Answer:
A
No answer description is available.
Let's discuss.
Discuss About this Question.
Post
Ad Slot (Above Pagination)
‹ Prev
1
2
3
4
5
6
7
8
9
10
11
Next ›
Install ExamAdept
Fast access — add this app to your device.
Install
✕
To install on iPhone/iPad: tap Share →
Add to Home Screen
.
Quiz
Discuss About this Question.