What do you mean by assigning a value to a variable
Plzzzzz answe it....
Answers
Question :-
What do you mean by assigning a value to a variable ?
Answer :-
Assigning a value to a variable means to give a particular value to a variable .
The assigned value is stored in the memory location of the variable.
Assignment of a value can be changed anytime depending on the user.
What is assignment operator ?
Answer :
Assignment operator is an operator with equal to sign .
( = ) sign is important .
int x = 4 .
It is used to assign the value of a variable.
You can still change the assigned value of x.
Write x = 6 then again the value is changed from 4 to 6.
Note :
The variable is written on the left.
The numeric value is written on the right.
Example :
int x = 5;
Here we assigned the value of x as 5.
double g = 9.0 ;
Here we assigned the value of g as 9.0 .
_________________________________________________________