Thursday, 11 June 2015

compilation and execution in c programs

Compilation and Execution in c programs


How to work compilation in c :   The compilation and execution defined as " once We have written the programs you need to type it and instruct the machine to execute it.You write a c program and you need to another c program called as " Editor ". 

Once we type a c programs it need to be converting to machine language (0's ,1) before the Machine Can Execute it. Carry Out This Converted We Need Another Program Called "Compiler". Compiler vendors provides an Integrated Development Environment ( IDE ). which consists of an Editor as well as the compiler. 

Most of the programs in the book would work with all the compilers.wherever there is a deviation I would point it out that time.

Assuming that you are using a turbo C or turbo C++ compiler . Here are the steps that you need to Steps follow to compile and execute your c programs.


1. Start the compiler at C> prompt. The compiler ( TC.EXE  is usually present in C:\TC\BIN directory ). 

2. Select New From the File menu.

3. Type the Program.

4. Save Program Using Keywords F2 Under a Proper name ( say Program 1.c ).

5. Use keyword Ctrl+F9  to Compile and Execute the program.

6. Use Keyword Alt+F5 to view the output. 


Example For Small Programs in c Better Understand 


Program Code :


#include<stdio.h>
int main()
{
printf("Welcome To AlltechPrograms.");
}

Output :

Welcome To AlltechPrograms.

No comments:

Post a Comment