Lec 01-03
Lec 01-03
C++
Lecture – 01 and 02
Subject Teacher:
Dr. Shamshad Lakho
• REFERENCE BOOKS:
1. “C/C++: The Complete Reference, Latest Edition”, By Herbert Schildt
2. “Understanding Pointers in C, Latest Edition”, By Yashvant Kanetkar
3. “Programming with C++, Latest Edition”, By John R Hubbard
Programming Languages Concepts
1. What is a programming language?
– A "programming language" is a means of communication
between a human being (programmer) and a computer. A
programmer uses this means of communication in order to
give the computer instructions. These instructions are
called "programs".
– A programming language is a set of rules that provides a
way of telling a computer what operations to perform.
– A programming language can be used to write programs
that control the hardware e.g.: Embedded processor in
Refrigerator, Air conditioner, Microwave oven etc.
Programming Languages Concepts
1. What is a programming language?
A computer cannot understand our language that we use in our day to day conversations,
and likewise, we cannot understand the binary language that the computer uses to do it’s
tasks.
Programming languages have been developed for the purpose of communicating with
computers.
• A low-level language.
• Allows the programmer to use abbreviations or words
instead of binary numbers, known as mnemonics.
• A program called an assembler transforms assembly
language into machine code.
Generation of Programming
Languages
• High-Level Language
• Also known as Procedure/Problem Oriented Language.
• Machine independent.
Examples of HLLs
FORTRAN Formula Translation Language
COBOL Common Business Oriented Language
BASIC Beginners All Purpose Symbolic Instruction Code
PL/I Programming Language I
PASCAL Named after Blaise Pascal, a French Philosopher
C General Purpose Programming Language
C++ Object Oriented Programming Language
JAVA Object Oriented Programming Language
Generation of Programming
Languages
• Very High Level Language
• Traditional/Procedural languages
– A program in a procedural language is a list of
instructions.
– There are two related problems with procedural
languages:
1. Functions have unrestricted access to global data
2. Unrelated functions and data
Why Do We Need OOP?
• Example:
– Objects as departments – such as I.T, finance, examination, and
so on - in a University
OOP Approach: University Paradigm
BCS Dept.
Dept. Data
Dead of
Dept.
Clerks
Director Controller Of
Finance Examination
Financial
Clerks
Assistant
Characteristics of OO Languages
• Objects
• Classes
• Inheritance
• Reusability
• Polymorphism and Overloading
Characteristics of OO Languages: Objects