Please enable JavaScript.
Coggle requires JavaScript to display documents.
TOKENS OF C PROGRAMMING :pen: - Coggle Diagram
TOKENS OF C PROGRAMMING :pen:
KEY WORDS
Keywords are predefined reserved words in C that have special meaning to the compiler. They are used to perform specific functions and cannot be used as identifiers
EXAMPLES: int, float, return, void
RULES: 1.All keywords are lowercase
2.Are predefined and reserved by the C language
IDENTIFIERS
:
Identifiers are the names given by the programmer to elements such as variables, functions, arrays, structures, etc. They are used to uniquely identify program elements
.
EXAMPLES
:
main, totalMarks, sum_1, _data
RULES: 1.Must start with a letter (A–Z or a–z) or an underscore _ .
2.No spaces or special characters (
,
!, %, etc.)
CONSTANTS
Constants are fixed values that do not change during the execution of a program. They are used to represent literal values like numbers, characters, and strings.
EXAMPLES: 100,'A',"HELLO",0.25
RULES:1,Value cannot be changed once defined
2.Can be declared using const or #define
OPERATORS
Operators are symbols that tell the compiler to perform specific mathematical or logical operations on operands
EXAMPLES : +,&,
,?,^*
RULES : 1.Must operate on valid operands
2.Must be used in proper syntax
SPECIAL SYMBOLS
Special symbols are characters that serve specific syntactical or operational purposes in a C program. They are used for structure, formatting, and program flow.
EXAMPLES : ;,(),#,\
RULES ;1.Must be used exactly as required in C syntax
2.Cannot be used in identifiers or values.
STRING
Strings are sequences of characters enclosed within double quotes ("). In C, strings are stored as arrays of characters and always end with a null characte
r
EXAMPLES : "Hello","12345","Good Morning"
RULES:1.Must be enclosed in double quotes (" ")
2.Cannot span across multiple lines without proper handling