Computer Science, asked by ravi7879747484, 1 month ago

explain the rules for variable declaration​

Answers

Answered by potikejain
0

Answer:

Variable name only start with a letter, an underscore ( _ ), of a dollar sign ( $ ). O The variable name should start with only letters O White spaces are not allowed between characters of variable but undersores are approved. O The variable name is case sensitive –TEMP and temp is different variable. O No two variables of same name are allowed to be declared in the same scope. O Every variable used must be declared. O Javascript allows declaration statements anywhere in the list of statements. O Variable declarations announce what variables will be used in the program. O A variable must be declared before it can be used. O Declaration statements can also be used to store an initial value into declared variables. O Variable name cannot start with a number.

3. RULES FOR VARIABLE DECLARATION O In java a variable name cannot start with a didit or hyphen. O Al variable can be “31” character long for many compiler. O Key word are not used as variable name. O Blank spaces special symbols commas are not used. O The first letter of the variable must be character of underscore. O The java languafe is case sensitive which implies that the variable num in lowercase is different from variable num in upper case. O Declaring an initial value of variable in the declaration statement is optional. O Variable may be declared in a list. O Both lower case and higher case digits are distinct.

Explanation:

mark me brainlist

Answered by Revathi75
0

For beginning programmers, it may be easier to begin all variable names with a letter of the alphabet. After the first initial letter, variable names can also contain letters and numbers. No spaces or special characters, however, are allowed.

Explanation:

variable is a container to store the data.

Similar questions