adplus-dvertising
frame-decoration

Question

What happens when an object is passed by reference?

a.

Destructor is not called

b.

Destructor is called at end of function

c.

Destructor is called when function is out of scope

d.

Destructor is called when called explicitly

Answer: (a).Destructor is not called

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What happens when an object is passed by reference?

Similar Questions

Discover Related MCQs

Q. When an object is passed to a function, its copy is made in the function and then:

Q. Which among the following is correct for destructors concept?

Q. When is it advised to have user defined destructor?

Q. Global destructors execute in ___________ order after main function is terminated

Q. Destructors can be ________

Q. Destructors doesn’t accept parameters.

Q. How the constructors and destructors can be differentiated?

Q. When is the destructor of a global object called?

Q. If in multiple inheritance, class C inherits class B, and Class B inherits class A. In which sequence are their destructors called, if an object of class C was declared?

Q. Which among the following is correct for abstract class destructors?

Q. When a destructor is called?

Q. Which among the following describes a destructor?

Q. The destructor can be called before the constructor if required.

Q. The destructors ____________

Q. The constructor _____________

Q. Which among the following is true for destructors?

Q. If a class have 4 constructors then it must have 4 destructors also.

Q. For explicit call _________________

Q. Number of destructors called are

Q. Destructor calls ________________ (C++)