share

SK

Thursday, January 12, 2017

Structure In HIndi



c भाषा मे program लिखने के लिये हमे sequence follow करणा पडता है |और इसी sequence wise हम program लिखते है | इसी को हम program stucture भी कह सकते है |

structure of program :-      preprocessor command
                                          global declearation
                                          main ()
                                         {

                                            local declearation

                                         }


compiler :-  हम जो program लिखते है ओ एक high level source code होता है | और कॉम्पुटर high level source code को समझ नही सकाता कॉम्पुटर सिर्फ machine  level language को हि समझ सकता है | और program मे लिखा हुआ code का मतलब कॉम्पुटर का समझाने के लिये उसे machine level language मे convert करणा पडता है तो compiler यहि काम करता है | compiler high level source code को machine level language मे convert करता है |


Preprocessor command - program को  execute करणे के लिये compiler को instruction देणी होती है | तो program के अंदर preprocessor command के मध्यम से हि compiler को
instruction दि जाती है | preprocessor command हमेशा “ # “ के  symbol से हि start होती है | # को preprocessor directive कहते है |

Example of preprocessor command :-

          #include  -   ये एक preprocessor command होती है | जो compiler मे header file provide करणे के लिये होती है |

          #define    -   ये preprocessor command program मे macross define करणे के लिये होती है |


Global declearation     -  इस section मे हम variable , function , structure , union etc को delear कर सकते है | इस section या तो program के सुरुवात मे लिखते है या तो end मे लेकीन generally इसे starting मे हि declear करते है |

main ()         -   ये c program का starting point होता है | हम जब program को run करते है तो compiler program का excution main () function से हि start करता है | इसीलिये main() function बनाना बहुत जरुरी होता है |


local declearation        -  ये section declearation के लिये होता है | जहा हम veriable, structure etc को define कर सकते है | इस section के अंदर veriable & data type किये होते है | और उन्हे सिर्फ प्रोरम के अंदर हि use किया जा सकता है | 






No comments:

Post a Comment