You are on page 1of 15

Programming Language Concept

Lecture-01
by
Muhammad Haleem
What is a program
• A program is a set of instructions that performs a
specific task when executed by a computer.

• A computer requires programs to perform different


functions, and typically executes all these program's
instructions with a central processing unit-(CPU).
?What is Programming

• Programming is the process of creating a set of instructions that tell a


computer how to perform a task. Programming can be done using a variety
of computer programming languages, such as Java, C#, PHP and C++.

• Programming is a source of communication between humans and


computers.

• Computer Programming is based on a programming language that computer


can understand in order to perform the needful tasks.
LANGUAGE?
• Language is a source of communication among people.
What is the computer language?
To establish a communication between user and computer .
In general, there are two classes of languages
• Natural languages
• Programming Languages

5
Natural languages
These are the languages through which the human beings communicate with each
other. For example: English, Urdu, French, Pashto etc.

Programming languages
These are the languages through which human (programmers) communicate with
the computer. These are the most widely used mediums between the user and the
computer. Examples are C/C++, java, C# and so on.
The programming languages are classified into two types:
1) Low level languages (Machine Language).
2) High level languages
6
Low level languages (Machine-level Language).

Machine-level programming
languages

• Fast and efficient,


executed directly on the
CPU
• Consists only of 0s and 1s
• Difficult for humans to
read, write, and debug
High Level Language

These languages are like English.

The programmer can understand more easily and enable the programmer
to write instructions easily using English words and familiar terms such as if
else, for, goto, +,- etc.

A program written in high-level language is translated into machine


understandable form with the help of translation programs i.e interpreter
or compiler.
8
Programming Language Preliminaries

Background:
Computer software can be categorized into two groups they are
1. Computer packages
2. Computer programming languages
Computer packages are all the applications of computer developed by
programmers and available for use, for example MS WORD is a computer
application. Using packages user is bounded to the facilities offered by
those Packages. So users can not append some functionality from his side.
Programming Language Preliminaries
Programming languages or Computer languages are the medium of
communication for the programmers to convey their requests to computers. If
programmer needs a service from computer not available in packages then the
programmer use the computer languages to develop their needful
functionality.
Definition of computer programming language:
Computer language is the set of alphabets, digits and symbols known by
computers.
Alphabets are: a,b,c,d … both in upper and lower case.
Digits are: 0-9
Symbols are: {,},(,),&,*,%,#,|,+,- and so on.
Programming Language Preliminaries…

C++ Programing Language:


C ++ is an efficient, portable, flexible and general purpose high level
computer programming language, which covers a wide range of
problems.
Explanation of some terms:
Efficient:
By efficiency we mean that the C++ compiler generates programs which
require least size for storage and there execution needs low processing
power. So programs generated using c language can be executed on small
tiny nodes like sensor nodes.
Programming Language
Preliminaries…
Portable:
Portability means transferable from one place to another
place. An C++ Program file can run on any machine regardless the operating
system whatever that may be.
Flexible:
Flexibility is an excellent feature of C++ language. It means that one
program can be written in many ways. Programmers select one the way
which is suited to him. So programmer has open choice dealing C++
language.
Programming Language Preliminaries…

General Purpose:
C++ is a general Purpose language in which we can do
mathematical calculations and also can implement
some operating system and network algorithms. C++
language has also some rich features of file handling.
Writing C++ Programs
• The source code of a C++ program is stored on the
disk with file extension cpp. (cpp stands for c plus
plus). The program is stored in a text file on the disk
any text editor can be used to write and edit C++
source code-(program).
• We will be using Dev C++ for writing programs.
Thank You…!

You might also like