what is the order of initialization for data?

Answer Posted / avi

Data members of a class are initialized in the order they
are declared in class. in case class is derived from some
base class then the base class will be initialized first
followed by the derived class.

Is This Answer Correct ?    14 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the copy-and-swap idiom?

620


Differentiate between a constructor and a method in C++.

568


Which software is used to run c++ program?

558


What does int * mean in c++?

651


Are iterators pointers?

685






Explain static and dynamic memory allocation with an example each.

654


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

1019


Is arr and &arr are same expression for an array?

592


Define virtual constructor.

651


Explain the differences between list x; & list x();.

614


What is a unnitialised pointer?

540


What are containers in c++?

579


What is searching?

670


Explain pass by value and pass by reference.

605


Is vector a class in c++?

606