Pages

Thursday, 18 February 2016

Understand Grammar of C


Understand Grammar of C

As human need a language to communicate with another human. Same in computer Science there is a language that helps to communication between human and computer. Here we are using C Language from many present language of Computer. 

C language and English Language are not different, that means if you want learn English then you should learn first the alphabet or characters used in English, then integrate these alphabets to make form, which in turn are integrated to make sentences and these sentences make paragraphs. Learning C is similar and easy like English.

Therefore we should learn grammar of C instead of straight away learning how to write programs which are following here?

Steps in learning English Language:

ALPHABETS > WORDS > SENTENCES > PARAGRAPH

Steps in Learning C Language

ALPHABETS, DIGITS AND SPECIAL SYMBOLS >CONSTANT ,VARIABLE,KEYWORD > INSTRUCTION > PROGRAM

Character Set of C Programming

Here, character means any digit, alphabet and special symbol that used to make necessary segments of program. Following table are given which express the valid alphabet, digit and special Symbols that allowed by C.

Alphabets
A,B …………………..Y,Z
A,b,……………….….y,z
Digit
0,1,2,3,4,5,6,7,8,9
Special Symbols
~ ‘ ! @ # % ^ & * ( ) _ - + = \ | { } [ ] : ;      < >  ,  .  ?  /
Figure1

C’s Character what make

When we combine properly to alphabet, numbers and special symbols then it form constants, variable and keywords. The way alphabets form words in English. Now you think what are constants, variables and keyword?


In passage of text, individual words and punctuation mark are called tokens, similarly in c program the smallest individual units are called C tokens. There are 6 types of token are present in C which are following.

Implementing and Running A "C" Program / เคธी เคช्เคฐोเค—्เคฐाเคฎ เค•ा เค•्เคฐिเคฏाเคจ्เคตเคฏเคจ

C เคช्เคฐोเค—्เคฐाเคฎ เค•ा เค•्เคฐिเคฏाเคจ्เคตเคฏเคจ

เคธी เคญाเคทा เคฎे เคช्เคฐोเค—्เคฐाเคฎ เค•ो เค•्เคฐिเคฏाเคจ्เคตिเคค เค•เคฐเคจे เคธे เคธंเคฌเคจ्เคงिเคค เคœाเคจเค•ाเคฐी เคนเคฎ เคจीเคšे เคฆिเคฏे เคšाเคฐ เคšเคฐเคฃो เคฎे เคฌเคคा เคฐเคนे เคนै เคœिเคจ्เคนे เค†เคช เคง्เคฏाเคจ เคธे เคชเคขे, เค‡เคธเค•े เค…เคฒाเคตा เคตो เค‰เคชเคฏोเค—เค•เคฐ्เคคा เคœो เคฒिเคจเค•्เคธ เคชเคฐ เค•ाเคฎ เค•เคฐเคคे เคนैं เค‰เคจเค•े เคฒिเค เค…เคฒเค— เค†เคฐ्เคŸिเค•เคฒ เค•े เคฎाเคง्เคฏเคฎ เคธे เคฌเคคाเคฏा เค—เคฏा เคนैं เค•ी เคฒिเคจเค•्เคธ เคฎे เค•ैเคธे เคธी เค•ा เคช्เคฐोเค—्เคฐाเคฎ เค•्เคฐिเคฏाเคจ्เคฏเคตिเคค เค•เคฐเคคे เคนैं।

เคชเคนเคฒा เคšเคฐเคฃ :

 1 -  เคธเคฌเคธे เคชเคนเคฒे เค†เคชเค•ो เค”เคฌ्เคœैเค•เคŸिเคต เคฏाเคจि เค•िเคธ เคช्เคฐเค•ाเคฐ เค•ा เคช्เคฐोเค—्เคฐाเคฎ เคฌเคจा เคนैं เคชเคคा เคนोเคจा เคšाเคนिเค เคœो เค†เคชเค•े เค•ंเคชเคจी เคธे เค†เคชเค•ो เคฎिเคฒेเค—ा, เค…เค—เคฐ เค†เคช เคตिเคฆ्เคฏाเคฐ्เคฅी เคนैं เคคो เคจिเคถ्เคšिเคค เคนी เค†เคชเค•े เคถिเค•्เคทเค• เค†เคชเค•ो เคช्เคฐोเค—्เคฐाเคฎ เคฆेंเค—े।

2-  เค‡เคธเค•े เคฌाเคฆ เคช्เคฐोเค—्เคฐाเคฎ เคฒिเค–เคจे เค•े เคฒिเค เคเคกिเคŸเคฐ เค•ा เคšเคฏเคจ เค•เคฐे, เค•เคˆ เค•ंเคชाเค‡เคฒเคฐ เคฎे เคเคกिเคŸเคฐ เคชเคนเคฒे เคธे เคนी เคนोเคคा เคนैं เค…เค—เคฐ เคจ เคนो เคคो เค†เคช notepad เคฎे เคญी เคช्เคฐोเค—्เคฐाเคฎ เคฒिเค– เคธเค•เคคे เคนैं।

3-  เค‡เคธเค•े เคฌाเคฆ เคช्เคฐोเค—्เคฐाเคฎ เคฒिเค–เคจे เค•े เคฌाเคฆ เค…เคชเคจे เคช्เคฐोเค—्เคฐाเคฎ เค•ो เคธेเคต เค•เคฐे เคชเคฐ เคง्เคฏाเคจ เคฐเค–े เค†เคช เคœो เคช्เคฐोเค—्เคฐाเคฎ เคธेเคต เค•เคฐเคจे เคœा เคฐเคนे เคนैं เค‰เคธเค•ा เคเค•्เคธ्เคŸेंเคธเคจ เคจेเคฎ  “॰C “ เคนोเคจा เคšाเคนिเค। 

4-  เค…เคฌ เค‡เคธ เคธूเคฐเค•्เคทिเคค เค•िเค เค—เค เคช्เคฐोเค—्เคฐाเคฎ เค•ो เคธोเคฐ्เคธ เค•ोเคก เค•เคนेंเค—े।

เคฆूเคธเคฐा เคšเคฐเคฃ :

1-  เค…เคฌ เคฌเคจाเค เค—เค เค‰เคธ เคช्เคฐोเค—्เคฐाเคฎ เค•ो เค•ंเคชाเค‡เคฒ เค•เคฐเคจा เคนोเค—ा। เค•ंเคชाเค‡เคฒ เคตเคน เคช्เคฐเค•्เคฐिเคฏा เคนैं เคœो เค†เคชเค•े เคฆ्เคตाเคฐा เคฌเคจाเค เค—เค เคช्เคฐोเค—्เคฐाเคฎ เค•ो เค‡เคจเคชुเคŸ เค•े เคฐूเคช เคฎे เคฒेเค•เคฐ เค‰เคธे เคฎเคถीเคจ เค•े เคธเคฎเคเคจे เคฏोเค—्เคฏ เคญाเคทा เคฎे เคคเคฌ्เคฆीเคฒ เค•เคฐ เคฆेเคคी เคนैं।

2-  เค…เค—เคฐ เค†เคช เคฌोเคฒाเคฐ्เคก เค•ा เค•ंเคชाเค‡เคฒเคฐ เค‰เคชเคฏोเค— เค•เคฐ เคฐเคนे เคนैं เคคो เค•ोंเคชเคˆเคฒ เค•เคฐเคจे เค•े เคฒिเค Alt + F9 เคช्เคฐेเคธ เค•เคฐे। 

3-  เค‡เคธเค•े เคฌाเคฆ เค•ोंเคชเคˆเคฒเคฐ เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เคฎे error เค•ो เคšेเค• เค•เคฐेเค—ा। เค…เค—เคฐ เค•ोเคˆ เคญी error เคจเคนीं เคนै เคคो เคตเคน object เฅžाเค‡เคฒ เค•ा เคจिเคฐ्เคฎाเคฃ เค•เคฐेเค—ा เค…เคจ्เคฏเคฅा เค†เคชเค•ो เคฎैเคธेเคœ เคตिंเคกो เค•े เคฎाเคง्เคฏเคฎ เคธे error เค•ी เคœाเคจเค•ाเคฐी เคฆेเค—ा।

เคคीเคธเคฐा เคšเคฐเคฃ :

1-  เค…เค—เคฐ เค•ंเคชाเค‡เคฒเคฐ เคฆ्เคตाเคฐा เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เคฎे เค•ोเคˆ error เคฌเคคाเคคा เคนैं เคคเคฌ เค†เคชเค•ो เค…เคชเคจे เคช्เคฐोเค—्เคฐाเคฎ เค•ो เคเค• เคฌाเคฐ เคชुเคจः เคชเฅเคจा เคนोเค—ा เคœिเคธเคธे error เค•ो เค†เคช เคธुเคงाเคฐ เคธเค•े। 

2-  เคเคฐเคฐ เค•ो เคธुเคงाเคฐเคจे เค•े เคฌाเคฆ เคเค• เคฌाเคฐ เคซिเคฐ เค†เคช เค…เคชเคจे เคช्เคฐोเค—्เคฐाเคฎ เค•ो เค•ंเคชाเค‡เคฒ เค•เคฐेंเค—े।

3-  เค…เค—เคฐ เคช्เคฐोเค—्เคฐाเคฎ เคฌिเคจा เคเคฐเคฐ เค•ा เคนैं เคคเคฌ เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เคฎे เคœเคฐूเคฐी เคฒाเค‡เคฌ्เคฐेเคฐीเฅ› เค•ो เคธเคฎ्เคฎाเคฒिเคค เค•िเคฏा เคœाเคเค—ा।

เคšौเคฅा เคšเคฐเคฃ 

1-  เคเคฐเคฐ เค•ो เคšेเค• เค•เคฐเคจे เค•े เคฌाเคฆ เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เคฎे เคœो เคนेเคกเคฐ เคซाเค‡เคฒ เค†เคชเคจे เคธเคฎ्เคฎाเคฒिเคค เค•िเคฏा เคฅा। เค‰เคธे เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เค•े เคธाเคฅ เคฒिंเค• เค•िเคฏा เคœाเคเค—ा।

2-  เคœो เคซंเค•्เคถเคจ เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เคฎे เค‰เคชเคฏोเค— เค•िเค เค—เค เคนैं เค‰เคจเค•ी เคชเคฐिเคญाเคทाเค เคฏा เค‰เคจเค•ी เคฒाเค‡เคฌ्เคฐेเคฐीเฅ› เค•ो เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เคฎे เคœोเฅœा เคœाเคเค—ा।

3-  เคฏเคน เค•ाเคฎ เคฒिंเค•เคฐ เคจाเคฎ เค•े เคฏूเคจिเคŸ เค•े เคฆ्เคตाเคฐा เค•िเคฏा เคœाเคคा เคนैं।

เคชंเคšเคตा เคšเคฐเคฃ :

1-  เค‡เคธเค•े เคฌाเคฆ เคเค• เคฌाเคฐ เคซिเคฐ เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เค•ो เคšेเค• เค•िเคฏा เคœाเคเค—ा เค•ी เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เคฎे เค•เคนि เคฐเคจ-เคŸाเค‡เคฎ เคเคฐเคฐ เคคो เคจเคนीं เคนैं।

2-  เค…เค—เคฐ เค•ोเคˆ เคฐเคจ-เคŸाเค‡เคฎ เคเคฐเคฐ เคชाเคˆ เคœाเคคी เคนैं เคคो เคฏूเคœเคฐ เค•ो เคฎैเคธेเคœ เค•े เคฆ्เคตाเคฐा เคธूเคšिเคค เค•िเคฏा เคœाเคเค—ा।

3-  เค”เคฐ เค‡เคธเค•े เคฌाเคฆ เคฏूเคœเคฐ เค…เคชเคจे เคช्เคฐोเค—्เคฐा เค•ो เคซिเคฐ เคธे เคœांเคš เค•เคฐेเค—ा।

4-  เค…เค—เคฐ เค†เคชเค•े เคช्เคฐोเค—्เคฐाเคฎ เคฎे เค•ोเคˆ เคฐเคจ- เคŸाเค‡เคฎ เคเคฐเคฐ เคจเคนीं เคคो เค†เคช เค•ा เคช्เคฐोเค—्เคฐाเคฎ เค•्เคฐिเคฏाเคจ्เคตिเคค เคนोเคจे เค•े เคฒिเค เคคैเคฏाเคฐ เคนैं।

 

Popular Posts