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
Can I learn c++ without c?
What is pointer to member?
Why null pointer is used?
Explain data encapsulation?
What is void pointer in c++ with example?
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?
Incase of a function declaration, what is extern means?
What is the function of I/O library in C++ ?
What are abstract data types in c++?
Explain the difference between static and dynamic binding of functions?
Can we sort map in c++?
why is c++ called oops? Explain
How would you use the functions sin(), pow(), sqrt()?
What is the latest c++ standard?
How is static data member similar to a global variable?