Friday, May 23, 2025
Tokens in c language

Tokens in C Language

Token एक program के सबसे smallest elements हैं, जो compiler के लिए meaningful हैं।

Types of Token in c

Token के निम्नलिखित types हैं: Identifiers, Keywords, Constant, Character set etc.

Tokens in C Language

Identifiers क्या हैं ?

Identifiers वे Name हैं जो आप संस्थाओं ( entities) को दे सकते हैं जैसे variables,functions, structures etc.

Identifiers के नाम unique होने चाहिए। वे एक program के निष्पादन ( execution ) के दौरान इसे identify करने के लिए C इकाई ( entity ) को विशिष्ट नाम देने के लिए बनाए गए हैं।

एक identifier alphanumeric characters का एक तार है जो एक alphabetic character or an underscore character से start होता है, जिसका use हम विभिन्न programming elements जैसे कि variables, functions, arrays, structures, unions  पर represent करने के लिए किया जाता है।

Actually, एक identifier एक user-defined word है।

Identifiers को represent करने के लिए 53 character हैं। 52 alphabetic characters हैं (यानी, uppercase और lowercase alphabets) और underscore character.

Underscore character को identifiers में एक letter माना जाता है। underscore character का उपयोग आमतौर पर एक identifier के बीच में किया जाता है।

Keyword क्या हैं ?

C language में keywords pre-defined words हैं। प्रत्येक keyword एक c program में एक specific function करने के लिए होता है। चूंकि keywords compiler के लिए नाम referred किए जाते हैं, इसलिए उन्हे variable name के रूप में use नहीं किया जा सकता है।

C Programming Language में 32 keyword हैं: 

 

auto double int struct
break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while

Constant क्या हैं ?

Constant एक variable की तरह होते हैं, सिवाय इसके कि एक बार defined होने के बाद execution के दौरान उनकी value change नही होती है।

Constant C programming language का सबसे fundamental and essential part है।

C में constant एक fixed value है जो एक program में use किया जाता है, और program के entire execution के दौरान इसकी value समान रहता है।

Constants को literals भी कहा जाता है।

Constants data types में से कोई भी हो सकता है।

Only upper-case के names का use करके constant को define करना सबसे अच्छी practice मानी जाती है।

Constants types in C :

  1. Numeric Constants
  2. Integer Constants
  3.  Real Constants
  4.  Character Constants
  5. Single Character Constants
  6. String Constants
  7. Backslash Character Constants

1. Integer constant :

Types of integer constant :

  1. Decimal Integer
  2.  Octal Integer
  3. Hexadecimal Integer

Example  15, -265, 0, 99818, +25, 045, 0X6

2. Real constant :

Example 99.25 जैसे fractional parts को real or floating points constant. कहा जाता है।

3. Single character constants :

Example  ‘X’, ‘5’, ‘;’

4. String constants :

Example “Codeash!”, “2019”, “2+16”

5. Backslash character constants

Example \t is used to give a tab
\n is used to give a new line

Character set क्या हैं ?

हर दूसरी language की तरह ‘C’ का भी अपना एक अलग character set है।

एक program instructions का एक set है जिसे execute करते time, एक output generate होता है।

Program द्वारा संसाधित( consists ) किए जाने वाले data में विभिन्न characters और symbols होते हैं। Generated output भी characters और symbols का एक संयोजन ( combination ) है।

Types Of character set :

  1. Alphabets
  2.  Numbers
  3. Special characters
  4. White spaces (blank spaces)

1. Alphabets

  • Uppercase characters (A-Z)
  • Lowercase characters (a-z)

2. Numbers

  • All the digits from 0 to 9

3. White spaces

  • Blank space
  • New line
  • Carriage return
  • Horizontal tab

4. Special characters

C में special characters को दी गई table में दिखाया गया है :

 

, (comma) { (opening curly bracket)
. (period) } (closing curly bracket)
; (semi-colon) [ (left bracket)
: (colon) ] (right bracket)
? (question mark) ( (opening left parenthesis)
‘ (apostrophe) ) (closing right parenthesis)
” (double quotation mark) & (ampersand)
! (exclamation mark) ^ (caret)
|(vertical bar) + (addition)
/ (forward slash) – (subtraction)
\ (backward slash) * (multiplication)
~ (tilde) / (division)
_ (underscore) > (greater than or closing angle bracket)
$ (dollar sign) < (less than or opening angle bracket)
% (percentage sign) # (hash sign)
My name is Yash Pogra and I am the chief blogger at Codeash and where I like to share my internet/tech experience with my online readers on this website. I have been a webmaster from 2015 which is when I had registered my first company by the name Codeash. I have ventured into different online businesses like offering SEO Services, Digital Marketing and website development services.

Related Article

No Related Article

5 Comments

Bhartiya kisan 18/05/2020 at 7:53 pm

भारतीय किसान भारत की सबसे लोक प्रिय कृषि-वेब होने के साथ कृषि समाचार वेब पोर्टल है। भारतीय किसान वेब पोर्टल का मुख्य उद्देश्य किसानों को कृषि क्षेत्र की खबरों से रूबरू करवाना है |

suresh kumar 03/04/2021 at 3:52 pm

This is very good content and very useful for every people.
Thank you sir

EldonWeata 09/10/2021 at 2:29 am

how to clean credit report yourself

Aegean College 17/05/2022 at 6:48 am

Hello, I think your blog might be having browser compatibility issues.
When I look at your website in Ie, it looks fine but when opening in Internet Explorer,
it has some overlapping. I just wanted to give you a quick heads up!
Other then that, fantastic blog!

26469;& 11/12/2022 at 9:25 pm

A motivating discussion is definitely worth comment. I do think that
you ought to publish more on this subject, it may not be a taboo matter but
generally people do not discuss such issues. To the next!
All the best!!

Leave a Comment