Tokens: Tokens are either keyword, identifier, constant, string or symbol which are used in C language programming.
For example:
printf(“Hello everyone”);
Here the tokens are:
1) printf
2) (
3) “
4) Hello everyone
5) ;
Use of Semicolons:
Semicolons are used as sentence terminators. Whenever the compiler see a semicolon, it takes the sentence preceding it as one complete instruction and first runs that command and then moves to next line.
Comments:
Comments are added in C language program so as to improve the readability of a program. Adding comments make it easy for others as well as programmers who programmed it easy to spot which part of program performs which function.
Comments are added by adding prefix /* and suffix */
For example:
/* this is my first comment */
The comment portion does not participate in programming and are for helping/ marking purpose only.
Keywords:
Keywords are reserved words which have special functions defined in the program. These words cannot be used for some other purposes or as a constant.
Some of the example of keywords are:
Auto, else, long, switch, break, enum, register, typedef, case, extern, return, union, char, float, short, unsigned, const, for, signed, void, continue, goto, sizeof, volatile, default, if, static, while, do, int, struct, _Packed, double and many more.
For example:
printf(“Hello everyone”);
Here the tokens are:
1) printf
2) (
3) “
4) Hello everyone
5) ;
Use of Semicolons:
Semicolons are used as sentence terminators. Whenever the compiler see a semicolon, it takes the sentence preceding it as one complete instruction and first runs that command and then moves to next line.
Comments:
Comments are added in C language program so as to improve the readability of a program. Adding comments make it easy for others as well as programmers who programmed it easy to spot which part of program performs which function.
Comments are added by adding prefix /* and suffix */
For example:
/* this is my first comment */
The comment portion does not participate in programming and are for helping/ marking purpose only.
Keywords:
Keywords are reserved words which have special functions defined in the program. These words cannot be used for some other purposes or as a constant.
Some of the example of keywords are:
Auto, else, long, switch, break, enum, register, typedef, case, extern, return, union, char, float, short, unsigned, const, for, signed, void, continue, goto, sizeof, volatile, default, if, static, while, do, int, struct, _Packed, double and many more.
No comments:
Post a Comment