Execution of ‘C’ program

when we talk about the ‘C’ Language , then the first thing that we talk about is the Compile and the Execution, so that today i m going to tell you how the things are working when you are going to compile your program.

First thing is that, what we write as a programmer its in the high level language and the computer do not understand the high language(C,C++,Java). The only language that the computer understands is the language of 1’s and 0’s that is the Binary language.

Process of Compiling and Running the C program

So that the thing called the “Compiler” will help us to convert our high level program(Source code) to the low level(Machine level/Binary language). and that’s it that is the work of the compiler, it is not going to execute your program.

when you will compile your program that will generate some kind of Object file that is the file which is in the lower level language, if and only if your program do not have any kind of error within that, else it will point to those errors , and again you have to modify that source code.

Now we will talk about the “Linker”, when you add some of the library files within your program, and use some of those functionality at that time to execute that code, first your C program needs to link  with those files , to use those functions and the it will copy the whole code of that file and put it within your C program, and will help you to run your program without any error, that is the function of the Linker, and one more thing Linker will also combine the Object file and the Library Files in to the thing called the .exe ( Executable file)  or we can say that a file that is portable, means we do not need to use the source code each and every time to deal with that program

And now when you are going to run that program, actually it will execute that particular executable file. this is how the ‘C’ program is going to be executed.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s