Introduction to C. Topics Covered Creating a program in C editing,  compiling, linking, running C basics program structure, variables,  statements Conversion. - ppt download
Creating a C program

After reading this you will be able to understand the concept of editing a c program.

So, firstly we must know that how to create and edit a C program.

Creating and Editing a C program

The process of writing a C program is called as editing. This process includes saving, editing, modifying and deleting the program statements. The part of Turbo C++ IDE is used to write C programs are called as edit window. A new edit window can be opened by selecting File >New option from menu bar. The edit window has a double lined border. The cursor blinks in the window.

Now how to save a program??….

Saving a C program

The process of storing a program on disk is called as saving. The program must be saved on disk to use repeatedly. C programs are saved with .exe extension. For example, a program can be saved like program.c. The following procedure is used to save a C program.

  1. Select File > Save OR press F2 key. The Save File As dialog box will appear by default name as NONAME00.CPP.
  2. Enter the file name.
  3. Enter the path to save the file.
  4. Click OK. The file will be saved on specified location.

Compiling a C program

The process of converting a source program into object program is called as compiling. The program saved with the extension of .c contains the statements of C language. It is known as source program. The source program cannot be directly understandable by the computer. It must be converted into object program in order to execute it. So, the extension of object program is .obj. Keep it in mind that source program cannot be compiled if it contains any syntax error.

Following is the procedure for compiling a C program.

  • Select Compile > Compile Or press Alt+F9 key. The program will be translated into object program if it contains no error.

Linking a C Program

The process of combining object program with additional library files is called as Linking. These files are used to perform different tasks such as input/ output. A library files must be linked with object program before execution. A program that combines object program with library files called as Linker. The linker generates an error if library does not exist. A new file is created with .exe extension if the process of linking is successful. The file is known as executable file.

Procedure = Compiler > Link from the menu bar.

Executing a C program

The process of running an executable file is known as executing. The C++ program can be executed after compiling and linking. The program must be loaded into memory before execution. A program that places an executable file into memory is known as loader.

Procedure = select Run > Run from menu bar or by pressing CTRL+F9.

The user can display the output screen by selecting Window > User Screen or pressing ALT+F5.

                                        Thank You….…..

Leave a Reply

Your email address will not be published. Required fields are marked *

Daftar Situs Bandar Togel Situs Bandar Togel Data Sydney kingcobratoto