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
What is c++ code?
How does c++ sort work?
What is a class template?
What is the difference between prefix and postfix versions of operator++()?
Why do we use double in c++?
Define the process of handling in case of destructor failure?
What is the difference between struct and class?
Is C++ case sensitive a) False b) Depends on implementation c) True
Which is most difficult programming language?
Explain rethrowing exceptions with an example?
Explain the difference between struct and class in terms of access modifier.
What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random
What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0
What is pure virtual function?
Does c++ vector allocate memory?