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
Do class declarations end with a semicolon? Do class method definitions?
Why is swift so fast?
Can we declare a base-class destructor as virtual?
What is this pointer in c++?
What should main() return in c and c++?
What is c++ similar to?
What does it mean to declare a member variable as static?
Should the this pointer can be used in the constructor?
What is an overflow error?
Can manipulators fall in love?
What is the difference between ++ count and count ++?
Write a function that swaps the values of two integers, using int* as the argument type?
What are virtual functions in c++?
Why c++ is better than c language?
What is object oriented programming (oop)?