Friday, September 25, 2009

C Program execution steps in C / C++ programming language.

What necessary steps are taken to prepare a C C++ program for execution ? Execution steps of C / C++ programming language.

C program are prepared to solve different type of problems. Many steps are required to convert a problem into a solution. These steps are in C programming language

  • Creating and Editing
  • Saving
  • Compiling
  • Linking
  • Loading
  • Running

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 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.

learn unix c, Learn C C++ Programming languages, C C++ Programming

Source of article: http://learnunixc-programming.blogspot.com/2009/09/c-program-execution-steps-in-c-c.html

2 comments:

  1. these notes helped me to complete my class assignment...
    Thanks

    ReplyDelete
  2. A Unix-like system is one that is similar to *BSD, GNU/Linux, Solaris, and the original Unix. Today, Mac OS X also qualifies as a Unix-like system. Unix is the origin of the popular C language. Every program on the computer links to the C library which provides basic system features including access to the kernel. Even if an application is written in another language, like C++, it still links to the C library. An interpreted language like perl needs a perl interpreter linked to the C library. This dependence on C can be a disadvantage. Most Unix-like kernels are written entirely in C; most common programs use C, C++ or Objective-C. It is difficult to add code to these programs in another language such as Fortran. In contrast, some non-Unix systems allow different programming languages to interact more easily.

    depression

    ReplyDelete

Ads