What is Life Cycle of C/C++ Program?

C++ Programming Tutorial

Life Cycle of C++ Programs

The processes or steps for creating to executing any C++ program refer to as life cycle of C++ program. It is basic and important to understand all steps while programming. Following are steps that need to understand in life cycle of C++ program.

Creating and editing C++ Program

The process of writing C++ program is known as editing. This process includes writing, modifying and deleting program statements. Dev C++ Compiler will be used to write C++ programs.

Saving C++ Program

The process of storing the program on disk is called “Saving”. A program must be saved on secondary storage device so that it can be used again and again. C++ programs are saved with .cpp extension. For example ABC.cpp shows name of program ABC with extension of C++ program.

Compiling a C++ Program

The process of converting source code into object code is called compiling a C++ program. A compiler converts source program file ABC.cpp into object program ABC.bin (Binary File).

Linking a C++ Program

The process of linking library files with object program is known as linking. Library files are used to accomplish different tasks like as input / output etc. A linker is required for this purpose. A program that combines object code with additional library files is known as “Linker”. It is part of C++ Compiler. Linker generate error message if the library file does not exist. A new file is created ABC.exe if linking process is completed successfully. This file known as executable file.

Loading C++ Program

After a executable program is linked and saved on the disk and it is ready for execution. We need another process which loads the program into memory and then instruct the processor to start the execution of the program from the first instruction. This processor is known as loader.

Executing C++ Program

The process of running an executable file ABC.exe is known as “executing”. After successfully executing C++ program output of the program will display on output device (console) like as display screen.

Post a Comment

Previous Post Next Post