Ask Question
6 May, 11:04

Which of the following is a valid variable name? a. salesTax b. input-string c. 25Percent d. double

+5
Answers (1)
  1. 6 May, 13:37
    0
    The correct answer of the given question is option (A) i. e salesTax

    Explanation:

    Variable are the storage area which value varies during the execution of aprogram.

    some of the rules of variable are

    1 Variable always start with alphabet.

    2 We cannot give variable name any reserve keyword.

    3 Variable cannot start with digit.

    4 We cannot use special symbol like -,$ to declare any variable

    In option (b) input-string, it is invalid variable because it uses special symbol "-" to declared the variable.

    In option (c) 25Percent, it is invalid variable because it violate the rule of variable and start with digit. variable cannot start with digit

    In option (d) double, it is invalid variable because it violate the rule of variable because double is keyword and variable never be a keyword.

    So option (A) is correct it follow the rule of variable.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following is a valid variable name? a. salesTax b. input-string c. 25Percent d. double ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers