Identifiers
Identifiers: A name or identifier in C can be anything from a single letter to a
word. Identifiers are the names given to program elements such as variables,
function names, array names and structure names. Once a type or value is
assigned to an identifier, it cannot be changed during the execution of the
program. For example: if an integer variable named as 'x' then 'x' will always
remain an integer variable which can hold only integer or numeric value.
Rules of identifier: 1) an identifier must be unique in a program.
2) An identifier can contain only alphabets, digits and underscore. No
any other symbol can be used.
3) The identifier must begin with a letter or an underscore.
4) An identifier must not start with a digit.
5) C language is a case sensitive language. It means upper case and
lower case letters are different identifier.
6) An identifier must not contain any white space. The white space
includes tab, spacebar and new line.
7) It can’t be a C language keyword or reserve word. As we know that C
is a case sensitive language and we can use different case of keywords as
identifier.
8) An identifier cannot use a symbol in naming.
9) Some valid examples are: a, box, tab10, roll_no, Roll_no, _abc, For.
10) Some invalid examples are: 10tab, for, ab$c, roll no.
2 Comments:
helpful blog thanks for sharing
spring mvc interview questions
machine learning online training
servlet interview questions
mytectra.in
wcf interview questions
I thought haven’t read such distinctive material anywhere else on-line.rahul
Post a Comment
Subscribe to Post Comments [Atom]
<< Home