Breaking

Monday 22 April 2019

Flow of C Program | C Program Tutorial


Flow of C Program



The C program pursues numerous means in execution. To comprehend the progression of C program well, let us see a basic program first.

File : - simple.c


    #include <stdio.h>   
    int main(){   
    printf("Hello C Language");   
    return 0;  
    } 


Execution Flow

We should attempt to comprehend the progression of above program by the figure given underneath.

1) C program (source code) is sent to preprocessor first. The preprocessor is dependable to change over preprocessor mandates into their individual qualities. The preprocessor produces an extended source code.


2) Expanded source code is sent to compiler which gathers the code and changes over it into get together code.

3) The get together code is sent to constructing agent which collects the code and changes over it into article code. Presently a simple.obj record is produced.

4) The item code is sent to linker which joins it to the library, for example, header records. At that point it is changed over into executable code. A simple.exe record is produced.

5) The executable code is sent to loader which loads it into memory and after that it is executed. After execution, yield is sent to reassure.

No comments:

Post a Comment