Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
662 views
in Electronics by (53.2k points)

Write the rules for forming the identifier name.

1 Answer

+1 vote
by (52.4k points)
selected by
 
Best answer

Rules to be followed while creating identifiers:

1. The first character of an identifier should always start with an alphabet or an underscore, which can be followed by either alphabets or digits or certain symbols.

2. An identifier may be of any length up to 32 characters. Some compilers limit the length to eight characters.

3. Identifiers can contain both uppercase and lowercase letters. C is case sensitive, that is, lowercase letters are not converted to uppercase letters when used in identifiers.

4. Special characters except underscore should not be used in identifiers. Successive underscores are also not allowed.

5. Identifiers should be single words i.e., blank spaces cannot be included in identifiers.

6. Reserved words should not be used as identifiers.

Legal identifiers Illegal identifier Legal but poor
Sum
Emp_name
Student_address
Number
age
Varun’s_addr
while
@total sum
do-it
counter
3by2

_help

sumo_1

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...