What is difference between initialization and assignment?

Answer Posted / sandeep mannarakkal

All object creation involves two steps,
1) Memory allocation
2) Memory initialization , so initialization is a part of object creation itself.
Assignment is the process of assigning values in to already available object.
Hope the concept is clear

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where must the declaration of a friend function appear?

528


Is swift faster than c++?

553


Why is "using namespace std;" considered bad practice?

643


What is algorithm in c++ programming?

581


What is c++ library?

590






What are friend functions in C++?

612


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

1824


Describe protected access specifiers?

666


What is the return value of the insertion operator?

597


Can you please explain the difference between using macro and inline functions?

515


Describe linkages and types of linkages?

555


Explain the difference between realloc() and free() in c++?

524


Write a program to show polymorphism in C++?

621


What is the difference between a type-specific template friend class and a general template friend class?

546


What is prototype for that c string function?

682