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

What is scope operator in c++?

561


What is tellg () in c++?

717


What do you mean by const correctness?

625


Define the process of error-handling in case of constructor failure?

563


What is DlgProc?

596






Is c++ built on c?

556


What is binary object model?

596


What are the general quetions are in DEna bank manager IT/System interviews?

1531


What is a list c++?

570


How should a contructor handle a failure?

684


What is data abstraction? How is it different from data encapsulation?

530


Difference between an inspector and a mutator

764


What is scope resolution operator in c++ with example?

551


What is meant by entry controlled loop?

656


What is an adjust field format flag?

644