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 are the benefits of pointers?

592


What is the type of this pointer in c++?

632


What is difference between c++ and c ++ 14?

575


Is map sorted c++?

517


Why c++ is created?

576






Describe the syntax of single inheritance in C++?

643


What is the need of a destructor? Explain with the help of an example.

566


If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

1000


Which software is best for coding?

572


Write about an iterator class?

612


To which numbering system can the binary number 1101100100111100 be easily converted to?

608


Explain overriding.

604


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

611


What is the main use of c++?

552


What are the sizes and ranges of the basic c++ data types?

585