Whenever we write any C program then it consists of different statements. Each C Program is set of statements and each statement is set of different c programming lexims. In C Programming each and every character is considered as single lexim. i.e [ Basic Lexical Element ]
Character Set Consists Of –
Types Character Set
Lowercase Letters a-z
Uppercase Letters A to Z
Digits 0-9
Special Characters !@#$%^&*
White Spaces Tab Or New line Or Space
IDENTIFIERS IN C LANGUAGE:
Each program elements in a C program are given a name called identifiers.
Names given to identify Variables, functions and arrays are examples for identifiers. eg. x is a name given to integer variable in above program.
RULES FOR CONSTRUCTING IDENTIFIER NAME IN C:
- First character should be an alphabet or underscore.
- Succeeding characters might be digits or letter.
- Punctuation and special characters aren’t allowed except underscore.
- Identifiers should not be keywords.
KEYWORDS IN C LANGUAGE:
Keywords are pre-defined words in a C compiler.
Each keyword is meant to perform a specific function in a C program.
Since keywords are referred names for compiler, they can’t be used as variable name.
C language supports 32 keywords which are given below. Click on each keywords below for detail description and example programs.
- auto
- double
- int
- struct
- const
- float
- short
- unsigned
- break
- else
- long
- switch
- continue
- for
- signed
- void
- case
- enum
- register
- typedef
- default
- goto
- sizeof
- volatile
- char
- extern
- return
- union
- do
- if
- static
- while
No comments:
Post a Comment