1. INTRODUCTION TO C LANGUAGE
2. ADVANTAGES OF C LANGUAGES
3. STRUCTURE OF C PROGRAM
4. WRITING AND COMPILING C
Introduction to C
Introduction to C Language
The C programming language was designed by
Dennis Ritchie at Bell Laboratories in the early 1970s
It was influenced by the following programming
ALGOL 60 (1960),
CPL (Cambridge, 1963),
BCPL (Martin Richard, 1967),
B (Ken Thompson, 1970)
Advantages Of C
General Purpose Programming Language
Middle Level Language
Speed Of Compilation
Disadvantages Of C
Lack of OOP features
No Namespace features
No concept of constructor and destructor
Interpretation and compilation are different ways of
translating high-level languages.
Interpreter is program that executes program
Generally execute one line/command at a time
Limited processing power
Easy to debug, make changes, view intermediate
Languages: BASIC, LISP, Perl, Matlab, C-shell
Translates statements into machine language
Does not execute, but creates executable program
Change requires recompilation
Languages: C, C++, Fortran, Pascal
o Name of the programmer
o Other detail about the program which the
programmer think can be useful later
o Begins with # sign.
o Command to include header files or symbolic
constant before compiling the program
Declaration of function or the global variables.
Execution starts from here
Compiling C Program
Read source code and evaluate preprocessor part.
Convert source code to assembly code
Create object code.
Link above object code files and other library files to
produce one complete executable file.