Ask Question
12 January, 04:43

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

+4
Answers (1)
  1. 12 January, 04:48
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers