Programming in C Language: Stages You Will Go Through

Harsh Gupta - Tech Writer
C language was developed at bell laboratories by "DENNIS RITCHIE" in 1972. C is a robust language but not portable i.e. programs written in C language in one operating system can't be run on another operating system or computer. C language is easily extendable as it is only a collection of functions, and we can add/delete functions to C language library. Programming in C language is not a difficult task. There are only four fundamental stages by which user will go through:

Editing:

Editing or Creation is the process of writing the set of instructions which is known as source code. An "EDITOR" provides us an environment to perform several tasks like-writing programs, editing the source code and compiling & running your programs along with debugging. This "EDITOR" is known as "IDE" i.e. "INTEGRATED DEVELOPMENT ENVIRONMENT". Some C compiler comes with the specific "IDE" which makes it easier to organize the source code. These "IDE" will also do the color highlighting for important parts of the code, to make it more readable and also provides an indication (if any) of any error in the source code e.g. TURBO EDITOR

Compiling the program:

In compilation process the compiler will automatically create machine code from the source code. Compiler will also lists out all the errors like invalid or unrecognized program code and structural errors e.g. part of code that can't be executed. The input to the compilation process is known as source code and the output is known as object file. After the compilation process has been successfully completed i.e. if there is no error in the source code then an object file is generated with extension '.obj'. This object file is the machine code file understandable only by the computer.

Linking the object code:

Linking phase is an important phase in C language where the required library files are linked to your program and other essential tasks are performed. During Linking phase, if any error occurs then you will have to re-edit the source code and run the program again. If linking is done successfully then it will produce a file that will be created with the same name as the source code but with the extension '.exe'. This compiled and linked program is called the "executable object code".

Executing the program:

After completing all the above processes successfully, we may run the program. In this phase, we finally get what we want. Errors are also produced in this phase; the wrong output or the run time errors like dividing by zero etc. These errors can be corrected by correcting the code in the editor. In most IDEs, you'll find an appropriate menu option to Run or execute your compiled program.

Published by Harsh Gupta - Tech Writer

I am a part time freelancer and writing is my hobby Some of my websites: http://www.GenericArticles.com http://www.JailBreakingiPhone.com  View profile

  • Programming in C language is not a difficult task.
Linking phase is an important phase in C language where the required library files are linked to your program and other essential tasks are performed. During Linking phase, if any error occurs

To comment, please sign in to your Yahoo! account, or sign up for a new account.