Assign a value to a variable. This operator is formally called the assignment operator.
var = value;
- var: any valid variable name
- value: any value of the same type as the variable. For example, if the variable is of type "char", the value must also be a char.
int x; //declare an integer variable named x
x=5; //store the value 5 in x
Note: The declared variable, needs to be able to hold the value stored in it.