টোকেন(Token) :
Types of Token
i) Keywords : int,float,while
ii) Identifiers : sum,main
iii) Constants : 100,555
iv) Strings : “Hello World”
v) Special Symbols : [] () {}, ; * = #
vi) Operators : +,-,*,/,%
Keyword :
Keyword হলো এমন কিছু সংরক্ষিত শব্দ,যা একটি নির্দিষ্ট অর্থ বহণ করবে এবং প্রোগ্রামে একটি নির্দিষ্ট কার্য সম্পাদন করবে।
সি প্রোগ্রামিং এ 32 টি Keyword আছে :
Keyword ব্যবহারেরে নিয়ম :
i. Keyword কখনো variable বা চলকের নাম হিসেবে ব্যবহার করা হয় না।
ii. Keyword সমূহের প্রতিটি বর্ণ small letterএর হয়।
iii. যদি কখনো দুটি keyword এক সাথে ব্যবহার করতে হয়,তাহলে মাঝখানে ফাকাঁ স্থান থাকতে হবে।
iv. keyword সমূহের নাম একটি একক শব্দ,অর্থাৎ মাঝে কোন ফাঁকা স্থান থাকে না।
Identifier:
Identifiers are used as the general terminology for naming of variables, functions and arrays.
Some identifiers are used :
A-Z,a-z,0-9,$,_
Constant :
Constants are also like normal variables. But, only difference is, their values can not be modified by the program once they are defined. Constants refer to fixed values.
Types of Constants :
1. Integer constants – Example: 0, 1, 1218, 12482
2. Real or Floating point constants – Example: 0.0, 1203.03, 30486.184
3. Octal & Hexadecimal constants – Example: octal: (013 )8 = (11)10, Hexadecimal: (013)16 = (19)10
4. Character constants -Example: ‘a’, ‘A’, ‘z’
String & Special Symbols :
In C, a string is a sequence of characters.
Special Symbols :The following special symbols are used in C having some special meaning and thus, cannot be used for some other purpose.[] () {}, ; * = #
1.Brackets[]: Opening and closing brackets are used as array element reference. These indicate single and multidimensional subscripts.
2. Parentheses(): These special symbols are used to indicate function calls and function parameters.
3. Braces{}: These opening and ending curly braces marks the start and end of a block of code containing more than one executable statement.
4. comma (, ): It is used to separate more than one statements like for separating parameters in function calls.
5. semi colon : It is an operator that essentially invokes something called an initialization list.
6. asterisk (*): It is used to create pointer variable.
0 Comments