0% found this document useful (0 votes)
49 views15 pages

Introduction To Programming

This document provides an introduction to programming using the C language. It discusses two categories of software: system software and application software. It then covers the history and evolution of the C language, noting it was developed in the 1970s from the BCPL and B languages to create operating systems like UNIX. The document outlines the development environment for C, including editors, compilers, debuggers, linkers, and loaders.

Uploaded by

soyixet51
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views15 pages

Introduction To Programming

This document provides an introduction to programming using the C language. It discusses two categories of software: system software and application software. It then covers the history and evolution of the C language, noting it was developed in the 1970s from the BCPL and B languages to create operating systems like UNIX. The document outlines the development environment for C, including editors, compilers, debuggers, linkers, and loaders.

Uploaded by

soyixet51
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

Introduction to Programming

Lecture 2

1
Today’s Lecture
 Software Categories
 System Software
 Application Software
 Introduction to ‘C’ Language
 History
 Evolution
 Justification
 Development Environment of ‘C’

2
There are two main categories of software

 System software

 Application Software

3
System software

 The system software controls the computer. It


communicates with computer’s hardware (key board,
mouse, modem, sound card etc.) and controls different
aspects of operations. Sub categories of system
software are:
Operating system windows7,windows8,Linux
Device drivers
Utilities

4
Application Software

 A program or group of programs designed for end users.


For example a program for Accounting, Payroll,
Inventory Control System, and guided system for planes.
GPS (global positioning system), another application
software, is being used in vehicles, which through
satellite determines the geographical position of the
vehicle

5
History of C language
 The C language was developed in late 60’s and early 70’s, in Bell
Laboratories.
 The BCPL language was developed in 1967 by Martin Richards as
a language for writing operating systems software and compilers.
 In 1970 Ken Thompson used B language to create early versions
of the UNIX operating system at Bell Laboratories. Thus both the
languages were being used to develop various system software
even compilers.

 BCPL ("Basic Combined Programming Language") is


a procedural, imperative, and structured programming language.
Originally intended for writing compilers for other languages,
BCPL is no longer in common use. 

6
 Both BCPL and B were ‘type less’ languages,
every data item occupied one ‘word’ in memory
and the burden of treating a data item as a whole
number or real number, for example was the
responsibility of the programmer.

 Dennis Ritchie developed a general purpose


language, called C language, by using different
features of BCPL and B languages.

7
 C uses many important concepts of BCPL and B
while adding data typing and other features. In
the start C became widely known as the
development language of the UNIX operating
system, and the UNIX operating system was
written by using this C language.

 The C language is so powerful that the compiler of


C and other various operating systems are written
in C.

8
Tools of the trade

 Editor
 Interpreter and Compilers
 Debuggers

9
Integrated Development Environment
(IDE)

It contains
 Editor
 Compilers
 Debugger
 Linkers
 Loaders

10
Editor Disk
Program is created in the
editor and stored on disk.
Preprocessor program
Preprocessor Disk processes the code.
Compiler creates object code
Compiler Disk and stores
it on disk.

Linker Disk Linker links the object


code with the libraries
Primary Memory
Loader
Loader puts program
Disk
in memory.
..
..
..

Primary Memory CPU takes each


instruction and executes it,
CPU 
possibly storing new data
values as the program
executes.
..
..
..

11
 EDITORS:
 First of all we need a tool for writing the code of a program. For this
purpose we used Editors in which we write our code.
 For programming purposes we don’t need word processors like bold
the text, italic, coloring the text etc. , we only need simple text. Text
editors are such editors which save only the text which we type. So for
programming we will be using a text editor.
 Compiler and Interpreter
 As we write the code in English and we know that computers can
understand only 0s nd 1s. So we need a translator which translates the
code of our program into machine language.

 There are two kinds of translators which are known as Interpreter and
Compilers. These translators translate our program which is written in
C-Language into Machine language.

 Interpreters translates the program line by line meaning it reads one


line of program and translates it, then it reads second line, translate it
and so on. The benefit of it is that we get the errors as we go along and12
it is very easy to correct the errors. The drawback of the interpreter is
that the program executes slowly
 Interpreters translates the program line by line meaning it reads
one line of program and translates it, then it reads second line,
translate it and so on. The benefit of it is that we get the errors as
we go along and it is very easy to correct the errors. The drawback
of the interpreter is that the program executes slowly.

 Compilers also translate the English like language (Code written in


C) into a language (Machine language) which computers can
understand. The Compiler read the whole program and translates it
into machine language completely.

 The difference between interpreter and compiler is that compiler


will stop translating if it finds an error and there will be no
executable code generated whereas Interpreter will execute all the
lines before error and will stop at the line which contains the error.

 So Compiler needs syntactically correct program to produce an


executable code. We will be using compiler in our course
13
 Debugger
 Another important tool is Debugger. Every programmer should
be familiar with it. Debugger is used to debug the program i.e.
to correct the logical errors. Using debugger we can control
our program while it is running.
 Linker
 Most of the time our program is using different routines and
functions that are located in different files, hence it needs the
executable code of those routines/functions.

14
 Loader
 After a executable program is linked and saved on the disk and
it is ready for execution. We need another process which loads
the program into memory and then instruct the processor to
start the execution of the program from the first instruction
(the starting point of every C program is from the main
function). This processor is known as loader. Linker and
loaders are the part of development environment. These are
part of system software. The following figure represents a
graphical explanation of all the steps involved in writing and
executing a program.

15

You might also like