Professional Documents
Culture Documents
Introduction
A Simple C Program
Example:
#include<stdio.h>
#include<conio.h>
int main ()
{
clrscr();
printf(“Welcome to C Language”);
getch();
return 0;
}
Output:
Welcome to C Language
The resulting definition, the ANSI standard, or "ANSI C", was completed late in
1988.
Why Use C?
Mainly because it produces code that runs nearly as fast as code written in
Assembly Language.
This is not because of its lack of programming power but because of its capability
to access the system's low level functions.
C is prized for its efficiency, and is the most popular programming language for
writing system software.
Execution of C Programs
Debugging capabilities
An integrated compiler
Code navigation tools
Compiling the Program:
The next step is to compile the program.
A C compiler converts executable code to object code.
Object code consists of binary instructions for the computer to execute.
The object code of a program is linked with libraries that are needed for the
execution of a program.
The linker is used to link the program with libraries.
It creates a file with '.exe' extension.
The final executable file is then run by the dos command prompt.
C Programming Advantages
C is a small, efficient, powerful and flexible language.
C is close to computer H/W (architecture).
C is standardized, making it more portable compared to other languages.
It contains libraries.