Professional Documents
Culture Documents
C Introduction
C Introduction
Characteristics of C
Robust language which consists of a number of built- in
function & operators which can be used to write complex
programs
Easy to learn
Used in development of Software (both application/system)
C programs are efficient and fast
Highly portable- works on different OS
Structured programming
BASIC STRUCTURE / FUNCTIONAL UNITS OF COMPUTER
4 steps of C program
library modules
4. Executing/ running the programs
Building a C program
WRITING AND EDITING PROGRAMS
The software used to write programs is known as
a text editor.
It is used to enter, change and store character
data.
The completed program is known as a source file
which is input to the complier.
Eg: Turbo C(TC), Borland C, Microsoft C/C++ ,
ANSI C, GCC,Tiny C compiler , MinGW Compiler
Compiling a C program
The job of the complier is to translate Source file to Machine level language
1. The Preprocessor
Preprocessor reads the source code and prepares it for translator.
The preprocessor scans for preprocessor commands and makes substitution in special
library codes.
2. The Translator
The translates preprocessed code and results a object module is the code in
machine language.
Translator is the one which does the actual conversion of program into machine
language.
LINKING & LOADING PROGRAMS
The linker assembles input/output processes and
mathematical library functions and the various
files together
To execute a program, we use an operating
system command such as run, to load the program
into primary memory (loader) and execute it.
Basic Structure of C program
Sample C programs