***Welcome to ashrafedu.blogspot.com * * * This website is maintained by ASHRAF***

Posts

    Sunday, November 8, 2020

    Structure of C program

     The general structure of a C program is


    Preprocessor directives tells the preprocessor to look for special code libraries, make substitutions in the code and in other ways prepare the code for translation into machine language.

    Declaration is the program statement that serves to communicate to the language translator information about the name and type of the data objects needed during program execution.

    The basic idea behind the global declaration is that all global declared are visible to all parts of the program.

    All functions including main() can be divided into two sections – local definition and statements

    Local definitions would be at the beginning of the functions which is followed by statement section. It describes the data that will be used in the function. Data objects in local definitions as opposed to global declarations are visible only to the function that contains them.

    Statement section consists of the instructions that cause the computer to do some work.

    No comments:

    Post a Comment

    Top