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++ library?
How do you save a c++ program?
I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.
Is linux written in c or c++?
What is #include iostream in c++?
Is rust better than c++?
How to get the current position of the file pointer?
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
How would you use the functions sin(), pow(), sqrt()?
Which software is best for c++ programming?
Mention the purpose of istream class?
Describe the role of the c++ in the tradeoff of safety vs. Usability?
What are put and get pointers?
What is a down cast?
What is an iterator?