Free eBooks for Beginners
Tokens in C are the basic building blocks of a C program. There are six types of tokens: keywords, identifiers, constants, strings, operators and special symbols. Keywords are reserved words in C, such as “int” and “while”, that have a specific meaning. Identifiers are names given by the programmer to variables, functions, etc. Constants are values that do not change during the execution of a program, such as numbers or characters. Strings are sequences of characters enclosed in double quotes. Operators are symbols used to perform operations, such as “+” and “*”. Special symbols include punctuation marks, such as “,” and “;”.
Each token in a C program must be separated by white space, such as a space or a tab. The C compiler uses these tokens to identify the meaning and structure of the program. Understanding tokens is a crucial step in learning C programming.
C Programming for Beginners – Chapter 05 : Tokens in C
Disclaimer: The information and code presented within this recipe/tutorial is only for educational and coaching purposes for beginners and developers. Anyone can practice and apply the recipe/tutorial presented here, but the reader is taking full responsibility for his/her actions. The author (content curator) of this recipe (code / program) has made every effort to ensure the accuracy of the information was correct at time of publication. The author (content curator) does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause. The information presented here could also be found in public knowledge domains.