Answer:
The incorrect answer is C. Keywords can be used as variable names.
Explanation:
Programming languages use variables to reserve a space in memory needed to hold the values while the program is executed. This memory space is allocated when the program execution begins and this memory is lost when program is terminated.
Every language has a set of rules to give names to the variables. Some commonly used conventions are listed below.
1. Variable names begin with alphabets or letters only.
Example a, sal
2. Variable names cannot begin with numbers or digits.
Example sal2019
3. Variable names can have underscores only in between.
Example mngr_sal, mngr_bonus
Underscores enable categorizing the variables based on the initial name like above.
4. Keywords cannot be used as names of variables.
Example Integer, String cannot be the name of any variable.
5. Special characters are not allowed in the names of the variables.
The above naming conventions are common across all programming languages. Other rules may be implemented specific to a particular language.
Variables are declared to tell the compiler to reserve a memory space which should be sufficient to hold the variable of this type.
int age;
char reply;
string name;
The above variables are of integer, character and string data type respectively.
Variable initialization assigns a value to the variables.
age = 24;
reply = ‘n’;
name = “Brainly Website”;
The character variable holds 1 letter at a time and is written in single quotes.
The string variable holds a sequence of characters, numbers and spaces and is enclosed in double quotes.
Variable declaration and initialization can be done simultaneously.
String full_name = “Lexi 8791”;
As a practise, variable names are not written in upper case except in case of constants. Constants can have names only in upper case.
An example of constant variable name declaration and initialization is given.
static final int MIN_USERS = 10;
The above information about variables is common across the programming languages.