Class Notes : Chapter 1 ( Part II )

2.Explain the rules for naming an identifier / variable ?

a). It may contain an arbitrary long sequence of letters, digits and _(under score)
b). First character must be letter or _
c). White space and special characters are not allowed.
d). Key words can not be used.
e). Upper and Lower case letters are treated separately(case sensitive).

Assignment

Identify the valid and invalid identifiers ( Give Reasons )

mark3, int , Class_name , 123school , school_name, for , school123, student name , student_name

Comments