Define order that local objects are destructed?, C/C++ Programming

Define order that local objects are destructed?

 

Posted Date: 3/15/2013 5:20:46 AM | Location : United States





A: In the reverse order of construction: First constructed, last destructed.

In the following instance, b''s destructor will be executed first, and then a''s destructor:

void userCode()

{

Fred a; Fred b;

...

}

 

Posted by | Posted Date: 3/15/2013 5:20:58 AM


Related Discussions:- Define order that local objects are destructed?, Assignment Help, Ask Question on Define order that local objects are destructed?, Get Answer, Expert's Help, Define order that local objects are destructed? Discussions

Write discussion on Define order that local objects are destructed?
Your posts are moderated
Related Questions
The break statement The break statement, which was already covered in the switch.. case, can also be used in the loops. When a loop statement is encountered in the loops the co

Default assignment operator mange assigning one object to another object of the same class. It is member to member copy as shallow copy.

C Program to copy the contents of a file: void main()    {   ifstream fin("input.txt");   ofstream fout("output.txt");   char ch;   while (fin)       {

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

check this link: http://cactus.eas.asu.edu/partha/Teaching/430.2013/Project/proj-2.2013.htm

Within C we access external devices by means of a pointer i.e. address. The address could point to any memory mapped device i.e. Ram, Rom, Duart, Disk drives etc. Therefore there i


Q: What are User Defined data types? C supports an extraordinary feature known as "type definition" that permits users to define an identifier that would represent an existing

Question: (a) (i) Explain how class members can be accessed when using objects of the class. Use a suitable example to illustrate your answer. (ii) Explain how the privat