What is a constructor initializer list and when we use
constructor initializer list?

Answer Posted / deep

There is couple special case when you need mandatory
constructor initialization list.

a. To initialise a const
b. To initialise a reference

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between object-oriented programming and procedural programming?

790


What is the difference between the functions memmove() and memcpy()?

720


What is the difference between global int and static int declaration?

503


what are Operators and explain with an example?

828


What is the header file for setw?

689






What do you mean by translation unit?

698


What is endl?

726


Explain the difference between new() and malloc() in c++?

719


What are the various situations where a copy constructor is invoked?

709


What is token c++?

664


What is the use of bit fields in structure declaration?

628


Differentiate between realloc() and free().

676


What is virtual table?

719


Why cstdlib is used in c++?

679


what is the difference between overloading & overriding? give example.

670