Computer Science, asked by hemansh3935, 1 year ago

What do you mean by assigning a value to a variable




Plzzzzz answe it....

Answers

Answered by Anonymous
2

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 .

_________________________________________________________


Pari0819: hi
Anonymous: inbox :)
Pari0819: kk
Similar questions