Computer Science, asked by TbiaSamishta, 1 year ago

Which of the following is not allowed as first character in valid variable name ?(a) Underscore (_) (b) Digit (c) Letter (d) Dollar ($)

Answers

Answered by vaibhavkr4337
5
Answer is Digit. A variable can never start from a digit.

Hope my answer helps :)
Answered by Secondman
2

"Option (b) Digit

      Digit cannot be used as “first character” in valid variable name. The programmer can use Underscore (_), letter or dollar ($) as the first  in a variable name.

      For example: The variable name can be given as int $number = 10; here $number is a valid variable. String name; here name is the valid variable name that starts with the letter. int _num; here _num is the valid variable that is declared as integer data type. But a variable name which starts with a digit that is not valid one.

"

Similar questions