Ask Question

Which of the following variable names is not valid? 1price 1 price price 1 price1

+3
Answers (2)
  1. 12 March, 11:47
    0
    1price 1 price price 1

    Explanation:

    The following variable names are not valid.
  2. 12 March, 11:57
    0
    1price 1 price price 1

    Explanation:

    In the c programming, the rule for valid variable name.

    1. Variable name cannot start with numeric value like 1,2,3 ...

    2. Space and special character other than underscore '_' are not allowed.

    3. After the first letter, numeric values can be used.

    Let discuss the options:

    Option A: 1price

    it start with number which is not allowed.

    Option B: 1 price

    it start with number and also contain the space which is not allowed.

    Option C: price 1

    it contain the space which is not allowed.

    Option D: price1

    it is the valid variable name, start with letter and their is no space.

    Therefore, option A, B and C are correct option.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which of the following variable names is not valid? 1price 1 price price 1 price1 ...” 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