Monday, March 5, 2018

Creating and Running Programs

Creating and Running Programs

There are four steps in this process.

1.   Writing and editing the program using Text editor (source code).

2.   Compile the program using any C compiler.(.bak file)

3.   Linking the program with the required library modules(object file)

4.   Executing the program. (.Exe file)

Creating and Editing a C Program in C Programming Language compiler:

Writing or creating and editing source program is a first step in c language. Source code is written in c programming language according to the type of problem or requirement, in any text editor.

Saving C Program in C Programming Language: Source code is saved on the secondary storage. Source code is saved as text file. The extension of file must be ".c". Example the file name is "learn c programming language.c"

Compiling C program in C Programming Language: Computer does not understand c programming language. It understands only 0 and 1 means machine language. So c programming language code is converted into machine language. The process of converting source code in to machine code is called compiling. Compiler is a program that compiles source code. Compiler also detects errors in


source program. If compiling is successful source program is converted into object program. Object program is saved on disk. The extension of file is ".obj"

Linking in C programming Language: There are many built in functions available in c programming language. These functions are also called library functions. These functions are stored in different header files.

Loading program: The process of transferring a program from secondary storage to main memory for execution is called loading a program. A program called loader does loading.

Executing program: Execution is the last step. In this step program starts execution. Its instructions start working and output of the program display on the screen.

No comments:

Post a Comment

Life Articles And News:

Life Articles And News: