➤Delimiters :-
Delimiters are used for syntactic purpose in C.
Delimiters are:-
- : colon used for label
- ; semicolon end of statement
- () parentheses used in expressions
- [] square brackets used for arrays
- {} curly braces used for block of statements
- # hash preprocessor directive
- , comma variable delimiter
➤Identifiers :-
- Identifiers are user defined words .
- They are used to give names to entities like variables,arrays, functions, structures etc.
⏩Rules for naming identifiers are given below:-
- The name should consist of only uppercase and lower case letters, digits and underscore sign(_).
- First character should be an alphabet or underscore.
- The name should not be a keyword.
- Blank space is not permitted .
- Since C is case sensitive, the uppercase and lowercase letters are considered different. For new, New and NEW are three different identifiers.
➤Expressions :-
- An expressions is a combination of operators, constants, variables and functions calls.
- An expressions can be arithmetic , logical or relational.
Some examples of expressions are:-
x+y - arithmetic operation
a=b+c - uses of two operator(=) and (+)
a>b - relational expression
a==b -logical expression
func(a,b)-function call
➤Comments:-
- Comments are used for increasing readability of the program.
- They explain the purpose of the program.
- There can be single line or multiple line comments.
- The closing delimiter can't be used inside a comment.
/* statements to be comment */
or
// statements to be comment
No comments:
Post a Comment