C pogromming ke
hindi tutorial me aapka swagat hai. Aaj hum c pogromming ke kuch basics
concept jaise tokens, keywords, aur identifiers ke bare me
janenge.
Basic Concept of C Programming:
Tokens:
Tokens ko
building block of c programming kaha jata hai. Yane iska matlab hai tokens ki
help se hi pura program banata hai. Program me use hone wale every small part
ko token kaha jata hai. Aasan bhasha me hum yesa bhi kaha sakate hai ki program
ek collection hai different tokens ka. Kisi bhi program ko banane ke liye
tokens ki jarurat hoti hai isliye tokens ko tik tarah se samaj lena jaruri hai.
Types Of
Tokens:
1. Keyword
2. Identifiers
3. Constants
4. String
5. Operators
6. Special
Symbols
1.
Keywords:
Keyword in predefined
meaning in c programming.
Keyword yane ek
word hota hai jiska meaning pahale hi define kiya hota hai. Jab bhi hum koi keyword
ka use program me karate hai to compiler ko pahale se uska meaning malum hota
hai.
C programming
me total 32 keywords hai. Jiski list maine niche di hai. sabhi keywords
ko small case me wirte kiya jata hai. Keywords ko hum variable, function name
ki tarah use nahi kar sakate.
Auto break case
char const
continue default do
double else
enum extern float for goto
if int long register return
short signed sizeof static struct
switch typedef union unsigned void
volatile while
enum extern float for goto
if int long register return
short signed sizeof static struct
switch typedef union unsigned void
volatile while
2.
Identifiers:
Definition:
Identifiers is
name given to the variable, function, structure, union etc.
Identifier ko
user define karata hai.
Identifiers ko
define karate samay kuch rules ko follow karana padata hai:
1. Identifier
ka name alphabet se start hona chahiye na ki kisi digit (number) se.
2. Identifier
ki length kitni bhi lambhi ho sakate hai kyon ye user defined hai.
3. Identifiers
me uppercase aur lower case ye dono alag alga hote hai.
4. Identifiers
name keyword nahi ho sakata.
5. Blank
spaces, white spaces allowed nahi hai.
3.
Constants:
Constant is
value which doesn’t change in program execution.
Constant yane
ek value hotii hai jo program execution me change nahi hota. Constant ki value fixed
hoti hai. Constant ke bhi different types hai to hum aage details me dekhenge.
e.g. x=10,
Age=15
4.
String:
It is sequence
of character.
String ek sequence
hota hai kisi bhe character ka.
Example:
Total,
Name=”umesh”
5.
Operators:
Operators is special
symbol which is used to perform the mathematical operation.
Operator is
symbol hota hai jiska usse programming me addition, subtraction, multiplication,
division is tarah ke mathematical operation karane ke liye hota hai.
C programming
me kayi tarah ke operator’s available hai. Jo hum aage details me dekhange.
Example:
+,-, /, % etc.
6.
Special Symbols:
C programming
me kuch special symbols ka use bhi hota hai. Symbols yane alphabet, digit ko
chodkar kuch symbols ka use programming me hota hai.
Example:
*, @, $ etc.
Niche Ke Program me tokens ka use kiya hai
/* Program for
demonstration of tokens */
# include
<stdio.h>
# include
<conio.h>
Void main ( )
{
Int a, b, c;
a=10;
b=20
c=a+b
printf(“\n
Addition=%d “, c);
getch();
}
Upar diye gaye examples me total identifiers ka use karke program
banaya gaya hai. Jisme
void– keyword
a, b – constants
=, +, % - Operators
(),{} – special symbols
Is tarah hum tokens ki help se koi bhi program built kar sakate
hai. Tokens ko understand karana ye ek c programming ka basic hai. To ab aap
tokens ke bare me jan gaye honge. Agar aapko kahi par bhi koi dikkat ho to
comment me jarur bataye.
wow Nice aswom Teaching sir.
ReplyDelete