You are on page 1of 16

FUNDAMENTALS OF C PROGRAMMING

Introduction

Dr.D.ROJARAMANI
Ms.G.RAJALAKSHMI
Department of Information Technology
Sethu Institute of Technology
CONTENTS

1
2 Why Should I
3 Why Use C 4 History 5
Why C Still
Learn C Useful

Typical C
Applications
6 SDM 7 Program
8
Programming
9 Features
10 of C
Development Languages of C
Environment
What is C
C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972. It was
designed and written by a man named Dennis Ritchie. In the late seventies C began to replace the more
C is a programming language developed at AT & T’s Bell Laboratories of
familiar languagesUSA
of that time like
in 1972. PL/I,
It was ALGOL,
designed andetc. No one
written by apushed C. It wasn’t
man named Dennis made the ‘official’
Bell Labs language.Ritchie. In the late
Thus, without anyseventies C began
advertisement, to reputation
C’s replace thespread
more familiar
and its pool of users grew.
languages of that time like PL/I, ALGOL, etc. No one pushed C. It wasn’t
Ritchie seems tomade
have the
been ratherBell
‘official’ surprised that so many
Labs language. programmers
Thus, preferred C to older languages
without any advertisement,
C’s reputation spread and its pool of users grew. Ritchie seems to have
like FORTRAN or PL/I,
been or the
rather newer ones
surprised that like Pascal
so many and APL. But,
programmers that’’s C
preferred what happened.
to older
It was mainly languages
developedlikeas FORTRAN or PL/I, or the language
a system programming newer ones
to like Pascal
write and APL.
operating system. The main
But, that’s what happened.
features of C language include low-level access to memory, simple set of keywords, and clean style,
these features make C language suitable for system programming like operating system or compiler
development.
Why Should I Learn C
C is a programming language developed at AT & T’s Bell Laboratories of
USA in 1972. It was designed and written by a man named Dennis
Ritchie. In the late seventies C began to replace the more familiar
languages of that time like PL/I, ALGOL, etc. No one pushed C. It wasn’t
made the ‘official’ Bell Labs language. Thus, without any advertisement,
C’s reputation spread and its pool of users grew. Ritchie seems to have
been rather surprised that so many programmers preferred C to older
languages like FORTRAN or PL/I, or the newer ones like Pascal and APL.
But, that’s what happened.
Why Should I Learn C
Learning C programming has lot of benefits, but the foremost thing in which it helps
is to understand the underlying architecture of how things works?
Consider a situation where a person learns to drive a Car. In this modern era
with advancement in technology, we have many options when it comes to buying car.
There are cars with auto-driving mode, auto gear change features etc which reduces
the manual overheads and makes driving the car easier. Suppose the person learns
driving on a auto-gear change enabled car. After learning driving, the person applied
for a driving licence for which he need to pass a driving test. The driving test is now on
a manual car with no auto-gear change feature. The person was even not able to
answer some basic questions related to gears as he was not even aware of it and
eventually ended up getting disqualified.
Learning C has a similar benefit. If the person had learned driving on a manual
car, he could have easily driven the automatic car as well. Similarly, if a person learns
C programming first, it will help him to learn any modern programming language as
well. As learning C help to understand a lot of underlying architecture of operating
system. Like, pointers, working with memory locations etc.
Why Use C
C language is much popular for embedded systems programming due to its flexibility. Programs written in C programming language are easy to read,
understand and edit. C language is free, and you do not have to pay anything even if you are using C language for embedded systems.
C is used in all the operating systems in your computer and your cellphone and even in programming robots. Java: Java places third on the list and
for good reason — it can run on many devices. If you have an Android phone, all of your apps are running Java.
C is the most basic language and almost all programming languages are derived from C. Other programming languages inherited their features from
C and hence C is called the mother of all programming languages.
Mainly because it produces code that runs nearly as fast as code written in assembly language. Some examples of the use of C might be
 Operating Systems
 Language Compilers
 Assemblers
 Text Editors
 Print Spoolers
 Network Drivers
 Modern Programs
 Databases
 Language Interpreters
 Utilities

Mainly because of portability that writing standard C programs can offer


History
C is a programming language developed at AT & T’s Bell Laboratories of
USA in 1972. It was designed and written by a man named Dennis
Ritchie. In the late seventies C began to replace the more familiar
languages of that time like PL/I, ALGOL, etc. No one pushed C. It wasn’t
made the ‘official’ Bell Labs language. Thus, without any advertisement,
C’s reputation spread and its pool of users grew. Ritchie seems to have
been rather surprised that so many programmers preferred C to older
languages like FORTRAN or PL/I, or the newer ones like Pascal and APL.
But, that’s what happened.
Why C Still Useful
Even after several decades of its introduction, C still continues to reign the industries
because of its salient features. Although Python, Java, and C++ have outpowered C in terms
C is a programming language developed at AT & T’s Bell Laboratories of
of demand in theUSAmarket,
in 1972. C Itcontinues to beand
was designed thewritten
base byrequirement
a man named that every programmer is
Dennis
Ritchie. In the late seventies C began to replace the more familiar
expected to belanguages
familiar with.
of that time like PL/I, ALGOL, etc. No one pushed C. It wasn’t
made the ‘official’ Bell Labs language. Thus, without any advertisement,
Possibly why C seemsspread
C’s reputation so popular is because
and its pool it is Ritchie
of users grew. reliable, simple
seems and easy to use.
to have
been rather surprised that so many programmers preferred C to older
Moreover, in languages
an industry where newer languages, tools and technologies emerge and vanish
like FORTRAN or PL/I, or the newer ones like Pascal and APL.
day in and day out, a language thatBut, hasthat’s what happened.
survived for more than three decades has to be really
good.
An opinion that is often heard today is—“C has been already superseded by languages like C+
+, C# and Java, so why bother to learn C today”. I seriously beg to differ with this opinion.
Why C Still Useful
There are several reasons for this. These are as follows:
(a) C++, C# or Java make use of a principle called Object Oriented Programming (OOP) to organize the program. This organizing principle has lots of advantages to offer. But
even while using this organizing principle you would still need a good hold over the language elements of C and the basic programming skills. So it makes more sense to first
C is a programming language developed at AT & T’s Bell Laboratories of
learn C and then migrate to C++, C# and Java. Though this two-step learning process may take more time, but at the end of it you will definitely find it worth the trouble.
USA in 1972. It was designed and written by a man named Dennis
(b) Major parts of popular operating systems like Windows, UNIX, Linuxand Android are written in C. This is because even today when it comes to performance (speed of
Ritchie. In the late seventies C began to replace the more familiar
execution) nothing beats C. Moreover, if one is to extend the operating system to work with new devices one needs to write device driver programs. These programs are
languages of that time like PL/I, ALGOL, etc. No one pushed C. It wasn’t
exclusively written in C.
made the ‘official’ Bell Labs language. Thus, without any advertisement,
(c) Mobile devices like Smartphones and Tablets have become rage of today. Also, common consumer devices like microwave ovens, washing machines and digital cameras are
C’s reputation spread and its pool of users grew. Ritchie seems to have
getting smarter by the day. This smartness comes from a microprocessor, an operating system and a program embedded in these devices. These programs not only have to run
been rather surprised that so many programmers preferred C to older
fast but also have to work in limited amount of memory. No wonder that such programs are written in C. With these constraints on time and space, C is the language of choice
languages like FORTRAN or PL/I, or the newer ones like Pascal and APL.
while building such operating systems and programs.
But, that’s what happened.
(d) You must have seen several professional 3D computer games where the user navigates some object, like say a spaceship and fires bullets at the invaders. The essence of all
such games is speed. Needless to say, such games won’t become popular if they take a long time to move the spaceship or to fire a bullet. To match the expectations of the
player the game has to react fast to the user inputs. This is where C language scores over other languages. Many popular gaming frameworks (like DirectX) have been built
using C language.
(e) At times one is required to very closely interact with the hardware devices. Since C provides several language elements that make this interaction feasible without
compromising the performance, it is the preferred choice of the programmer.
I hope that these are very convincing reasons why you should adopt C as the first, and a very important step, in your quest for learning programming.
Software Development Method

Verification &
Testing
Implemenation Test and Debug the
Write Code Code
Design
Develop Algorithms
Analysis
Refine, Generalize,
Requirement Decompose the
Problem Definition
Specification
Problem Definition
Typical C Program Development Environment

Phases of C Program
 Edit
 Preprocess
 Compile
 Link
 Load and Execute
Programming Languages
 Various Programmng Languages
 Some Understandable directly by computers
 Other requires translation steps by
Machine Language
• Natural Language of a particular computer
• Consists of strings of numbers (1s and 0s)
• Instructs computer to perform elementary operations one at a time
• Machine Dependent
There are three main kinds of programming language:
• Machine language.
• Assembly language.
• High-level language.
Features of C
Applications of C
THANK YOU
Education is the most powerful weapon which you can use to change the world

You might also like