5. What is identifier ? Explain the rules for giving identifiers. .
Answers
Explanation:
An identifier is nothing but a name assigned to an element in a program. Example, name of a variable, function, etc. Identifiers are the user-defined names consisting of 'C' standard character set. As the name says, identifiers are used to identify a particular element in a program. Each identifier must have a unique name.
Answer:
In computer languages, identifiers are tokens that name the language entities. Some of the kinds of entities an identifier might denote include variables, types, labels, subroutines, and packages. Which character sequences constitute identifiers depends on the lexical grammar of the language
Rules for an Identifier:
An Identifier can only have alphanumeric characters(a-z , A-Z , 0-9) and underscore( _ ). The first character of an identifier can only contain alphabet(a-z, A-Z) or underscore ( _ ). Identifiers are also case sensitive in C. ... Keywords are not allowed to be used as Identifiers.
Explanation: