what is the order of initialization for data?

Answer Posted / nilay

all the static memebers are created at the time of class
definition and rest all non static memebers are created
when object is created of that class. member functions are
also create in memory when class is defined. (However only
single copy of static data members and functions is created)

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?

774


Why do we need pointers?

759


I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.

2528


How do I tokenize a string in c++?

806


Why is swift so fast?

853


When should we use multiple inheritance?

806


What is an accessor in c++?

821


Write some differences between an external iterator and an internal iterator?

810


What information can an exception contain?

902


What are the advantages of using a pointer?

808


Is dev c++ free?

795


What is the meaning of c++?

771


How can we read/write Structures from/to data files?

859


How to tokenize a string in c++?

799


What is the difference between #import and #include?

780