History and Features of C (PPT-2)

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Problem Solving Using

(Fundamentals of C PPT-2)

By :
Ms.Inderpreet Kaur
AP, BCA

1
History of ‘C’
C language was first developed in 1972 by Dennis Ritchie at
bell laboratories of AT&T (American Telephone &
Telegraph), located in the U.S.A. It was developed to
overcome the problems of previous languages such as B,
BCPL, etc.
BCPL B
Founder
derived of C

6
What is C language??
• C programming is considered as the base for other
programming languages, that is why it is known as
mother language.
• It can be defined by the following ways/Other
names of Programming C
1. Mother language
2. System programming language
3. Procedure-oriented programming language
4. Structured programming language
1) C as a mother language

• C language is considered as the mother language


of all the modern programming languages
because most of the compilers, JVMs, Kernels,
etc. are written in C language, and most of the
programming languages follow C syntax, for
example, C++, Java, C#, etc.
• It provides the core concepts like
the arrays, strings,functions,file handling etc.
2) C as a system programming language

• C language is a system programming language


because it is generally used to create hardware
devices, OS, drivers, kernels, etc. For example,
Linux kernel is written in C.
• It can't be used for internet programming like
Java, .Net, PHP, etc.
3) C as a procedural language

• A procedural language specifies a series of steps


for the program to solve the problem.
• A procedural language breaks the program into
functions, data structures, etc.
• C is a procedural language. In C, variables and
function prototypes must be declared before
being used.
4)C as a structured programming language

• A structured programming language is a subset of


the procedural language. Structure means to
break a program into parts or blocks so that it
may be easy to understand.
• In the C language, we break the program into
parts using functions. It makes the program easier
to understand and modify.
5) C as a mid-level programming language

• C is considered as a middle-level language because


it supports the feature of both low-level and high-
level languages. C language program is converted
into assembly code, it supports pointer arithmetic
(low-level), but it is machine independent (a
feature of high-level).
Why C is popular??
C is one of the foundations for modern information
technology (IT) and computer science (CS).
C is the most commonly used programming language in
industry.
C is one of the most commonly used programming
languages in colleges and universities.
C is the base for almost all popular programming languages

5
Application of C Programming

• C language is used for creating computer applications


• Used in writing Embedded softwares
• Firmware for various electronics, industrial and
communications products which use micro-controllers.
• It is also used in developing verification software, test code,
simulators etc. for various applications and hardware
products.
• For Creating Compiles of different Languages which can take
input from other language and convert it into lower level
machine dependent language.
• C is used to implement different Operating System
Operations.
List of Applications of C Programming

• List of Application
• Operating Systems
• Network Drivers
• Compilers
• Assemblers
• Text Editors
• Language Interpreters
• Simulators
• Embedded System
Which level is C language belonging to ?
• There are 3 types of languages:
1. High level languages
2. Middle level language //C is middle level language
3. Low level languages
• A Low-level language is specific to one machine, i.e., machine
dependent. It is machine dependent, fast to run. But it is not easy to
understand.
• A High-Level language is not specific to one machine, i.e., machine
independent. It is easy to understand.
• A Middle level language C is called middle-level language because it
actually binds the gap between a machine level language and high-level
languages. A user can use c language to do System Programming (for
writing operating system) as well as Application Programming (for
generating menu driven customer billing system )
Contd…
Contd…
• The main difference between high level
language and low level language is that, Programmers
can easily understand or interpret or compile the high
level language in comparison of machine.
• On the other hand, Machine can easily understand the
low level language in comparison of human beings.
• A computer understands instructions in machine code,
i.e. in the form of 0s and 1s. It is a tedious task to write a
computer program directly in machine code.
• Examples of high level languages are C, C++, Java, Python
, etc.
Features of C Language

1. Low Level Language Support


2. Portability
3. Powerful
4.Bit Manipulation
5.High Level Features
6.Modular Programming
7.Efficient Use of Pointers
8.Rich Library
Features of C Language
• 1 . Low Level Features :
• C Programming provides low level features that are
generally provided by the Lower level languages. C is
Closely Related to Lower level Language such as
“Assembly Language“.
• It is easier to write assembly codes in C prgramming.
• 2 . Portability :
• C Programs are portable i.e they can be run on any
Compiler with Little or no Modification
• Compiler and Preprocessor make it Possible for C
Program to run it on Different PC
Features of C Language
• 3 . Powerful
• Provides Wide verity of ‘Data Types‘
• Provides Wide verity of ‘Functions’
• Provides useful Control & Loop Control Statements
• 4 . Bit Manipulation
• C Programs can be manipulated using bits. We can
perform different operations at bit level. We can
manage memry representation at bit level
• It provides wide verity of bit manipulation Operators.
We have bitwise operators to manage Data at bit level.
Features of C Language
• 5 . High Level Features :
• It is more User friendly as compare to Previous languages.
Previous languages such as BCPL,Pascal and other programming
languages never provide such great features to manage data.
• Previous languages have there pros and cons but C
Programming collected all useful features of previous languages
thus C become more effective language.
• 6 . Modular Programming
• Modular programming is a software design technique that
increases the extent to which software is composed of separate
parts, called modules
• C Program Consist of Different Modules that are integrated
together to form complete program
Features of C Language
• 7 . Efficient Use of Pointers
• Pointers has direct access to memory.
• C Supports efficient use of pointer .
• 8.Rich Library -
• C provides a lot of inbuilt functions that make the
development fast.
• 9.Extensible -C language is extensible because it can
easily adopt new features.
What is machine Level Language ?

• Machine code is the only language a microprocessor can


process directly without a previous transformation.
• Currently, Programmers never write programs directly in
machine code, because it requires attention to numerous
details which a high-level language would handle
automatically.
What is High-Level language?
• A High-Level language is not specific to one machine, i.e.,
machine independent. It is easy to understand.
• High level Language is Human understandable Language.
• English is Common example of High Level Language.
• Ex: A- Z,a-z,
What are translators/language processors?
OR
Execution Models of HLL

• A translator that is used to translate the program written


in high-level language into machine code is
called language translator/Language Processor
• The language processors can be any of the following three
types:
• 1.Interpreter
• 2.Assembler
• 3.Compiler
Contd…
List of C compilers for windows OS
• There is various compiler of C & C++ language for windows that
are given below:
• CCS C Compiler
• Turbo C
• Minimalist GNU for Windows (MinGW)
• Portable C Compiler
• Clang C++
• Digital Mars C++ Compiler
• Intel C++
• IBM C++
• Visual C++ : Express Edition
How to install C

• There are many compilers available for c and c++.


Here, we are going to use Turbo C++. It will work
for both C and C++. To install the Turbo C software,
you need to follow following steps.
• Download Turbo C++
• Create turboc directory inside c drive and extract
the tc3.zip inside c:\turboc
• Double click on install.exe file
• Click on the tc application file located inside c:\TC\
BIN to write the c program
Thank You

You might also like