+ 3
Which of the following are invalid variables names in c and why
a) #HASH b)Total% c)Variable name d)WHILE e)_main() f)Salary g)$hello h)1st
6 odpowiedzi
+ 4
As listed in the C tutorial:
"... The name of a variable (also called the identifier) must begin with either a letter or an underscore and can be composed of letters, digits, and the underscore character... "
In other words, a variable cannot begin with anything which is not an underscore or an alphabetical character. A variable cannot contain anything which is not an underscore, an alphabetical character or a numeric character.
+ 3
So which of these is invalid variable and reason for that
+ 3
Naveen Shah Well, do you have any guesses? If you can tell us your answer and your perspectives as to why those are your answers, we can correct you if necessary. From the rules I quoted, the answers should be obvious.
+ 2
g) will be valid in PHP but not C.
+ 1
Which of the following are invalid names and why ?
Row2, Minimum, float, Customer Name,&Rollno,First_Name,A$