C-Programming :-
Introduction of C :-
C is a computer programming language developed in 1972 by Dennis M. Ritchie at the Bell
Telephone Laboratories to develop the UNIX Operating System. C is a simple and structure
oriented programming language.
C is also called mother Language of all programming Language. It is the most widely use
computer programming language, This language is used for develop system software and
Operating System. All other programming languages were derived directly or indirectly from
C programming concepts. Here we discuss complete C Tutorial in simple and easy way. C is
a programming language that serves as a medium for programmer to instruct computer to do
a job or making programs/software.
C language is developed by Mr. Dennis Ritchie in the year 1972 at bell laboratory at USA, C
is a simple and structure Oriented Programming Language.
In the year 1988 C programming language standardized by ANSI (American national
standard institute), that version is called ANSI-C. In the year of 2000 C programming
language standardized by ISO that version is called C-99. All other programming languages
were derived directly or indirectly from C programming concepts.
C is also called mother Language of all programming Language. It is the most widely use
computer programming language, This language is used for develop system software and
Operating System. All other programming languages were derived directly or indirectly from
C programming concepts.
In the year 1988 'C' programming language standardized by ANSI (American national
standard institute), that version is called ANSI-C. In the year of 2000 'C' programming
Language standardized by 'ISO' that version is called C-99
Where we use C Language
C Language is mainly used for;
Design Operating system
Design Language Compiler
Design Database
Language Interpreters
Utilities
Network Drivers
Assemblers
Features of C:-
It is a very simple and easy language, C language is mainly used for develop desktop based
application. All other programming languages were derived directly or indirectly from C
programming concepts. This language have following features;
Simple
Portability
Powerful
Platform dependent
Structure oriented
Case sensitive
Compiler based
Modularity
Middle level language
Syntax based language
Use of Pointers
Simple
Every c program can be written in simple English language so that it is very easy to
understand and developed by programmer.
Platform dependent
A language is said to be platform dependent whenever the program is execute in the same
operating system where that was developed and compiled but not run and execute on other
operating system. C is platform dependent programming language.
Note: .obj file of C program is platform dependent.
Portability
It is the concept of carrying the instruction from one system to another system. In C
Language .C file contain source code, we can edit also this code. .exe file contain
application, only we can execute this file. When we write and compile any C program on
window operating system that program easily run on other window based system.
When we can copy .exe file to any other computer which contain window operating system
then it works properly, because the native code of application an operating system is same.
But this exe file is not execute on other operation system.
Powerful
C is a very powerful programming language, it have a wide verity of data types, functions,
control statements, decision making statements, etc.
Structure oriented
C is a Structure oriented programming [Link] oriented programming language
aimed on clarity of program, reduce the complexity of code, using this approach code is
divided into sub-program/subroutines. These programming have rich control structure.
Modularity
It is concept of designing an application in subprogram that is procedure oriented approach.
In c programming we can break our code in subprogram.
For example we can write a calculator programs in C language with divide our code in
subprograms.
Case Sensitive
Case Sensitive is another features of C Language. It is a case sensitive programming
language. In C programming 'break and BREAK' both are different. It is also main feature of
C Language.
If any language treats lower case latter separately and upper case latter separately than they
can be called as case sensitive programming language [Example c, c++, java, .net are
sensitive programming languages.] other wise it is called as case insensitive programming
language [Example HTML, SQL is case insensitive programming languages].
Middle Level Language
C programming language can supports two level programming instructions with the
combination of low level and high level language that's why it is called middle level
programming language. C is middle level programming language it is one of the most
important feature of C.
Compiler Based
C is a compiler based programming language that means without compilation no C program
can be executed. First we need compiler to compile our program and then execute.
Syntax Based Language
Syntax Based is another features of C Language. C is a strongly tight syntax based
programming language. If any language follow rules and regulation very strictly known as
strongly tight syntax based language. Example C, C++, Java, .net etc. If any language not
follow rules and regulation very strictly known as loosely tight syntax based language.
Example HTML.
Efficient use of Pointers
Pointers is a variable which hold the address of another variable, pointer directly direct
access to memory address of any variable due to this performance of application is improve.
In C language also concept of pointer are available.
History of C :-
Language Year Developed By
Algol 1960 International Group
BCPL 1967 Martin Richard
B 1970 Ken Thompson
Traditional C 1972 Dennis Ritchie
K&RC 1978 Kernighan & Dennis Ritchie
ANSI C 1989 ANSI Committee
ANSI/ISO C 1990 ISO Committee
C99 1999 Standardization Committee
Difference Between Source Code and Object Code
Source Code
Source code is in the form of Text form.
Source code is Human Readable Code.
Source code is Generated by Human or Programmer.
Source code is receive Compiler as a Input.
Object Code
Object Code is in the form of Binary Numbers.
Object Code is in Machine Readable formats.
Object Code is Generated by Compiler.
Object Code is Generated by Compiler as a Output.
Difference between source code and object code.
Source Code Object Code
Created by the programmer Created by the Compiler
Text rich document Binary digits make up the Object Code
Human Readable Machine Readable
Can be changed over time Needs to compile the Source Code each
time a change is to be made
Instructions written using English words and Instructions encoded in Binary digits
according to syntax of the language
Not system specific System specific
Source code is the text used to express Object code is the output from a compiler
instructions at a high-level that is human that has compiled said source code
readable
Serves as input to the compiler It is the output of the compiler
Source code is not CPU executable Object code is CPU executable
Compiler in C
A compiler is system software which converts programming language code into binary
format in single steps. In other words Compiler is a system software which can take input
from other any programming language and convert it into lower level machine dependent
language.
Interpreter
It is system software which is used to convert programming language code into binary format
in step by step process.
Assembler
An assembler is system software which is used to convert the assembly language instruction
into binary format in step by step process. An assembler is system software which is used to
convert the assembly language instruction into binary format.