0
<< variables and the use in a code
declaring
4 ответов
0
please make your questions understandable
0
explain your question please
0
if you mean 'what are variables?', variables are just like named placeholders for values of their type. they must be declared with a name and their type specified. for instance 'int myNumber' is a variable of type 'integer' and name 'myNumber' - this means that this variable can take any integer as its value, for example -2, -7, 0, 3, 100, etc. you can always change the value of a variable by using the assignment operator (=), for example myNumber = 6;. You can assign a value to a variable in its declaration, for example, char letter = 'A';. Note that constant variables (variables declared with keyword 'const') cannot be changed, once assigned, for example, const int var = 12;
0
in the above post, i meant to write '... you can always change the value of a variable by using the assignment operator (=)...'****