What is difference between initialization and assignment?

Answer Posted / lucky

Some defference between Initialization and assignment
Initialization means whenever we initialize any var. at
declaration time.So as we initialize var. in init() in java
programming.For i.e.
prblic init()
{
int a=10;
}
Assignment means whenever we assigne any value in any var.
except const. variable.For i.e.
int a,b;
a=15; //right
b=a; //right
const c;
c=10 or c=a; //Worng
const d=20; //that is initialization

Is This Answer Correct ?    22 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which operator cannot overload?

537


What is the full name of logo?

582


How does java differ from c and c++?

535


What do you mean by public protected and private in c++?

597


What is class syntax c++?

590






What is cin clear () in c++?

602


What is format for defining a structure?

582


What is setf in c++?

572


Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

617


What is wrapper class in c++?

624


What are the rules for naming an identifier?

553


What is enum class in c++?

702


What is scope operator in c++?

558


Can we distribute function templates and class templates in object libraries?

583


How can virtual functions in c++ be implemented?

605