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
5
Answer is Digit. A variable can never start from a digit.
Hope my answer helps :)
Hope my answer helps :)
Answered by
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
Math,
7 months ago
Science,
7 months ago
Math,
1 year ago
Computer Science,
1 year ago
Biology,
1 year ago
Computer Science,
1 year ago