SlideShare une entreprise Scribd logo
1  sur  28
C++ Programming
Basic Learning
Prepared By
The Smartpath Information systems
www.thesmartpath.in
Index
1. About C++ Programming Language
2. Basic Concepts of OOPs
3. Basic Concepts of OOPs(continue….)
4. Basic Concepts of OOPs(continue….)
5. Basic Concepts of OOPs(continue….)
6. Benefits
7. Languages with Object Oriented Features
8. C++ Programming Environment
9. C++ Program Structure
10.C++ Program Structure (Explanation)
11.Creating Class and Objects
12.Explanation
Index
14 . C++ Program Syntax
15. Keywords
16. Data Types
17. Operators in C++
18. Operators in C++ (continue….)
19. Variables
20. Working With Classes
21. Feature of OOP - Inheritance
22. Types of Inheritance
23. Polymorphism - Operator Overloading
24. Operators that cannot be overloaded
25. OOPs Applications
About C++ programming language
C++ is an object-oriented programming language developed by Bjarne Stroustrup
at AT&T Bell Lab in the year 1980. Initially it was named “C with classes” but later
in 1983 the name changed to C++. It is an extension of C with major addition of
classes.
It supports concepts of Object Oriented Programming known as OOP concepts
C++ can be said as superset of C. It provides bottom-up and object oriented
design.
Basic concepts of object oriented programming
Objects
Object is an entity in program. They are also called class variables.
An object represents real world things such as person, student, etc
Objects contain data and methods in it. When object is created in a
program memory is allotted to a program.
Class
Class is a user-defined data type which holds data and program code.
It is collection of objects of similar type.
Concepts of object oriented programming
Encapsulation
The wrapping up of data and functions in a class is known as encapsulation.
The functions inside class can use the data within it. It is not accessible
outside world directly only function who is member of class or friend function
can access data.
Data Abstraction
Abstraction is hiding details of a process and presenting essential features
to the user. By creating a class and putting data and methods in it. We use
objects to access.
Concepts of object oriented programming
Inheritance
The feature of inheritance provides reusability of class. This is a process through
Which a class acquires the properties of another class. The class which is created
By inheritance is called derived class , and class whose features are inherited is
Called base class
Polymorphism
It is the feature that gives ability to take different forms. To behave differently
in different forms. It is done through operator overloading. An operator has one
or more behavior. With same name it acts differently
Concepts of object oriented programming
Dynamic Binding
binding is done as compiler does not know what are functions in a program. It
gets to know when binding or linking of code and function is done either at run
time or compile time. Run time binding is called as dynamic binding or early
binding. It is linking of code and function at the run time. Also called late binding.
In early binding or compile time binding function and code are linked when file is
compiled
Message passing
Just as people communicate with each other . Objects also communicate with
each other through message passing. They send and receive information with]
each other. When object gets message it invokes a procedure in it and generate
results of the procedure call.
Benefits
Benefits of OOP
 object oriented systems can easily be upgraded from small to large systems
 software complexity can be easily managed
 Through Inheritance classes once created can be used again as required
 Through abstraction and data hiding. Data is secure.
languages with object oriented features
1. C++
2. JAVA
3. C#
4. Falcon
5. Delphi
6. Objective C
7. Python
8. PHP5
9. Perl
C++ programming Environment
C++ Programming Environment consists of Text Editor and C++ compiler
(1) Text Editor - Programs are typed in Text Editor . By default a new file
Noname.cpp is opened. Type your programs here , save it , compile and
run.
(2) Compiler – Compiler is a System software that is installed on computer
to compile and run programs. Most widely Turbo C compiler is used
C++ program Structure
A C++ program consists of the following
1. Class
2. Methods
3. Object
4. Instance Variables
For Example creating a class
#include< iostream.h>
int main( )
{
statements;
getch();
return 0;
}
C++ program Structure Explained
1. #include - This statement adds the necessary header file iostream.h to the
program. It contains methods for input and output in a program
2 int main() – The program execution starts with main method.
3. Type the statements inside main( ) method.
.
4. getch() – marks the end of program and returns to programming window
5. return 0- In C++ main() method is of int type, it is not necessary to return
a value always so we take return 0; statement.
Creating Class and objects in C++
Example of class and object
#include<iostream.h>
Class sample // class named Sample
{
public:
int a; // instance variable
void get() // member method
};
Int main( )
{
sample S; // method is called using object S
S.get();
}
Explanation
1. Class is created using class ‘keyword’
2. Class has name Sample it has instance variable in which data is stored
3. It has member method called get() . It can access the data in it.
4. main() method is defined.
5. An Object of class is created in main()
6. method of class is called using object of class
C++ program Syntax
1. In Each Program header file iostream.h is included in the beginning
2. put semicolon at the end of each statement
3. When using classes create class and put semicolon at the closing bracket
4. method are called member methods and variables are called data member
5. The main method is of type int. ie.. Int main() is used in programs
6. Getch() is placed before return 0;
7. Return 0; statement is necessary because main has return type int.
8. Comments are given after two slashes as // comments
9. comments are not executed they are used to enhance readability of program
Key Concepts
DataTypes
Operators in C++
1. Arithmetic operators 2. Relational operators
addition + Equals ==
subtraction - Not Equal !=
Multiplication * Greater than >
Division / Greater than equal to >=
Modulus % Less than <
Less than equal to <=
Operators in C++
3 . Logical operators
logical AND &&
logical OR ||
logical NOT !
4. Scope Resolution Operator - ::
5. Memory allocation operator - new
6. Memory release operator - delete
7. Line feed operator - endl
8. Field Width operator - setw()
Variables
Variables in C++ is valid name in the memory where input given by user is
stored and the result of program is stored. When a variable is declared
in program , it occupies space in memory according to its size. Such as
integer type takes 2 bytes of memory, char type takes 1 byte of memory
Example :
#include<iostream.h>
int main()
{
int a;
float b;
}
Working with Classes
A class definition starts with the keyword class followed by the class name;
and the class body, enclosed by a pair of curly braces. A class definition
must be followed either by a semicolon or a list of declarations.
The keyword public determines the access attributes of the members of the
class that follow it. A public member can be accessed from outside the class
anywhere within the scope of the class object. You can also specify the
members of a class as private or protected .
Private member cannot be accessed out side the class. Only the public
member method of a class can access private data and method
Protected – It determines the scope up to a single level of inheritance
Feature of OOPs - Inheritance
Inheritance
Inheritance is using the previously defined class as required
Base Class – The Class which is used for deriving a new class and whose
features are used by it , is called Base class.
Derived Class- The newly formed class which contains features of base
class and also contains features of its own
Types of Inheritance
Polymorphism – operator overloading
Polymorphism
It is achieved through operator overloading. With this we can create new definition
of the operators by giving special meaning to them.
Syntax: <return type> class name : : operator (arguments)
{
statements;
}
Example: void sample : : + operator()
{
x = +x;
y = +y;
}
Operators that cannot be overloaded
1. Class member access operators - ( dot . , *)
2. Scope resolution operator - ::
3. Size operator - sizeof( )
4. Conditional operator - ? :
Oops Applications
1. Real Time Systems
2. Simulation and Modeling
3. Object Oriented Databases
4. Hypertext , hypermedia
5. Decision Support Systems
6. Office Automation Systems
7. CAD / CAM Systems
The smartpath information systems  c plus plus

Contenu connexe

Tendances

C++ Basics introduction to typecasting Webinar Slides 1
C++ Basics introduction to typecasting Webinar Slides 1C++ Basics introduction to typecasting Webinar Slides 1
C++ Basics introduction to typecasting Webinar Slides 1Ali Raza Jilani
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming CourseDennis Chang
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language samt7
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming LanguageSteve Johnson
 
C++ programming intro
C++ programming introC++ programming intro
C++ programming intromarklaloo
 
Learning C++ - Introduction to c++ programming 1
Learning C++ - Introduction to c++ programming 1Learning C++ - Introduction to c++ programming 1
Learning C++ - Introduction to c++ programming 1Ali Aminian
 
C++ Programming Language Training in Ambala ! Batra Computer Centre
C++ Programming Language Training in Ambala ! Batra Computer CentreC++ Programming Language Training in Ambala ! Batra Computer Centre
C++ Programming Language Training in Ambala ! Batra Computer Centrejatin batra
 
(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_iNico Ludwig
 
Tokens expressionsin C++
Tokens expressionsin C++Tokens expressionsin C++
Tokens expressionsin C++HalaiHansaika
 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for EngineeringVincenzo De Florio
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++Ankur Pandey
 

Tendances (20)

C++ Basics introduction to typecasting Webinar Slides 1
C++ Basics introduction to typecasting Webinar Slides 1C++ Basics introduction to typecasting Webinar Slides 1
C++ Basics introduction to typecasting Webinar Slides 1
 
C programming notes
C programming notesC programming notes
C programming notes
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming Course
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
 
Intro to C++ - language
Intro to C++ - languageIntro to C++ - language
Intro to C++ - language
 
C++ for beginners
C++ for beginnersC++ for beginners
C++ for beginners
 
basics of c++
basics of c++basics of c++
basics of c++
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
 
C++ programming intro
C++ programming introC++ programming intro
C++ programming intro
 
Learning C++ - Introduction to c++ programming 1
Learning C++ - Introduction to c++ programming 1Learning C++ - Introduction to c++ programming 1
Learning C++ - Introduction to c++ programming 1
 
C++ Programming Language Training in Ambala ! Batra Computer Centre
C++ Programming Language Training in Ambala ! Batra Computer CentreC++ Programming Language Training in Ambala ! Batra Computer Centre
C++ Programming Language Training in Ambala ! Batra Computer Centre
 
C by balaguruswami - e.balagurusamy
C   by balaguruswami - e.balagurusamyC   by balaguruswami - e.balagurusamy
C by balaguruswami - e.balagurusamy
 
(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i(2) c sharp introduction_basics_part_i
(2) c sharp introduction_basics_part_i
 
Tokens expressionsin C++
Tokens expressionsin C++Tokens expressionsin C++
Tokens expressionsin C++
 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for Engineering
 
Ppt of c++ vs c#
Ppt of c++ vs c#Ppt of c++ vs c#
Ppt of c++ vs c#
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 

En vedette

Innovative web design in delhi
Innovative web design in delhiInnovative web design in delhi
Innovative web design in delhiJatin Arora
 
Object-Oriented Programming 3
Object-Oriented Programming 3Object-Oriented Programming 3
Object-Oriented Programming 3Warawut
 
Object-Oriented Programming 2
Object-Oriented Programming 2Object-Oriented Programming 2
Object-Oriented Programming 2Warawut
 
Fundamentals of programming finals.ajang
Fundamentals of programming finals.ajangFundamentals of programming finals.ajang
Fundamentals of programming finals.ajangJaricka Angelyd Marquez
 
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software DevelopmentChapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software DevelopmentEduardo Bergavera
 
Diploma in computer application
Diploma in computer applicationDiploma in computer application
Diploma in computer applicationignounict
 
Looping and switch cases
Looping and switch casesLooping and switch cases
Looping and switch casesMeoRamos
 
BASIC KNOWLEDGE OF COMPUTER
BASIC KNOWLEDGE OF COMPUTERBASIC KNOWLEDGE OF COMPUTER
BASIC KNOWLEDGE OF COMPUTERNiraj Choudhary
 
DCA- Basic Fundamental, My computer, Desktop, History of computer
DCA- Basic Fundamental, My computer, Desktop, History of computerDCA- Basic Fundamental, My computer, Desktop, History of computer
DCA- Basic Fundamental, My computer, Desktop, History of computerKiet Raipur
 
Control structure C++
Control structure C++Control structure C++
Control structure C++Anil Kumar
 
6 months module of Basic computer training
6 months module of Basic computer training6 months module of Basic computer training
6 months module of Basic computer trainingShailendra Tewari
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programmingavikdhupar
 
Computer Basics 101 Slide Show Presentation
Computer Basics 101 Slide Show PresentationComputer Basics 101 Slide Show Presentation
Computer Basics 101 Slide Show Presentationsluget
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming LanguageAhmad Idrees
 

En vedette (14)

Innovative web design in delhi
Innovative web design in delhiInnovative web design in delhi
Innovative web design in delhi
 
Object-Oriented Programming 3
Object-Oriented Programming 3Object-Oriented Programming 3
Object-Oriented Programming 3
 
Object-Oriented Programming 2
Object-Oriented Programming 2Object-Oriented Programming 2
Object-Oriented Programming 2
 
Fundamentals of programming finals.ajang
Fundamentals of programming finals.ajangFundamentals of programming finals.ajang
Fundamentals of programming finals.ajang
 
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software DevelopmentChapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software Development
 
Diploma in computer application
Diploma in computer applicationDiploma in computer application
Diploma in computer application
 
Looping and switch cases
Looping and switch casesLooping and switch cases
Looping and switch cases
 
BASIC KNOWLEDGE OF COMPUTER
BASIC KNOWLEDGE OF COMPUTERBASIC KNOWLEDGE OF COMPUTER
BASIC KNOWLEDGE OF COMPUTER
 
DCA- Basic Fundamental, My computer, Desktop, History of computer
DCA- Basic Fundamental, My computer, Desktop, History of computerDCA- Basic Fundamental, My computer, Desktop, History of computer
DCA- Basic Fundamental, My computer, Desktop, History of computer
 
Control structure C++
Control structure C++Control structure C++
Control structure C++
 
6 months module of Basic computer training
6 months module of Basic computer training6 months module of Basic computer training
6 months module of Basic computer training
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
Computer Basics 101 Slide Show Presentation
Computer Basics 101 Slide Show PresentationComputer Basics 101 Slide Show Presentation
Computer Basics 101 Slide Show Presentation
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 

Similaire à The smartpath information systems c plus plus

Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++Amresh Raj
 
Object oriented programming in python
Object oriented programming in pythonObject oriented programming in python
Object oriented programming in pythonnitamhaske
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)Jay Patel
 
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...Akhil Mittal
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPTAjay Chimmani
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introductionsandeep54552
 
Introduction to C++ Programming
Introduction to C++ ProgrammingIntroduction to C++ Programming
Introduction to C++ ProgrammingPreeti Kashyap
 
Oosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partOosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partManuSingh669370
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++KAUSHAL KUMAR JHA
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionRai University
 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionRai University
 

Similaire à The smartpath information systems c plus plus (20)

My c++
My c++My c++
My c++
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 
Object oriented programming in python
Object oriented programming in pythonObject oriented programming in python
Object oriented programming in python
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
 
C++ first s lide
C++ first s lideC++ first s lide
C++ first s lide
 
C++ & VISUAL C++
C++ & VISUAL C++ C++ & VISUAL C++
C++ & VISUAL C++
 
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...
 
OOPS_Unit_1
OOPS_Unit_1OOPS_Unit_1
OOPS_Unit_1
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
 
C++ Version 2
C++  Version 2C++  Version 2
C++ Version 2
 
Introduction to C++ Programming
Introduction to C++ ProgrammingIntroduction to C++ Programming
Introduction to C++ Programming
 
Oosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partOosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction part
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroduction
 
Java
JavaJava
Java
 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroduction
 

Dernier

9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncrthapariya601
 
Delhi Escort Service [Today√√ 8800357707 √√ Sexy VIP Call Girls Aerocity
Delhi Escort Service [Today√√ 8800357707 √√ Sexy VIP Call Girls AerocityDelhi Escort Service [Today√√ 8800357707 √√ Sexy VIP Call Girls Aerocity
Delhi Escort Service [Today√√ 8800357707 √√ Sexy VIP Call Girls Aerocitymonikaservice1
 
Book Call Girls in Anand Vihar Delhi 8800357707 Escorts Service
Book Call Girls in Anand Vihar Delhi 8800357707 Escorts ServiceBook Call Girls in Anand Vihar Delhi 8800357707 Escorts Service
Book Call Girls in Anand Vihar Delhi 8800357707 Escorts Servicemonikaservice1
 
Trusted Call~Girls In Rohini Delhi꧁❤ 9667422720 ❤꧂Escorts
Trusted Call~Girls In Rohini Delhi꧁❤ 9667422720 ❤꧂EscortsTrusted Call~Girls In Rohini Delhi꧁❤ 9667422720 ❤꧂Escorts
Trusted Call~Girls In Rohini Delhi꧁❤ 9667422720 ❤꧂EscortsLipikasharma29
 
9643097474 Full Enjoy @24/7 Call Girls In Mahipalpur Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Mahipalpur Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Mahipalpur Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Mahipalpur Delhi Ncrthapariya601
 
Call Girls In Lajpat Nagar Delhi➥9911191017 High Class Escorts In 24/7 Delhi NCR
Call Girls In Lajpat Nagar Delhi➥9911191017 High Class Escorts In 24/7 Delhi NCRCall Girls In Lajpat Nagar Delhi➥9911191017 High Class Escorts In 24/7 Delhi NCR
Call Girls In Lajpat Nagar Delhi➥9911191017 High Class Escorts In 24/7 Delhi NCRsafdarjungdelhi1
 
Tibetan Call Girls In Majnu Ka Tilla Delhi 9911107661
Tibetan Call Girls In Majnu Ka Tilla Delhi 9911107661Tibetan Call Girls In Majnu Ka Tilla Delhi 9911107661
Tibetan Call Girls In Majnu Ka Tilla Delhi 9911107661safdarjungdelhi1
 
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)ayushiverma1100
 
Call Girl In Malviya Nagar Delhi 9711800081 Escort Service
Call Girl In Malviya Nagar Delhi 9711800081  Escort ServiceCall Girl In Malviya Nagar Delhi 9711800081  Escort Service
Call Girl In Malviya Nagar Delhi 9711800081 Escort Servicegitathapa4
 
Call Us ➥9911191017▻Young Call Girls In Guru Dronacharya Metro Station Delhi NCR
Call Us ➥9911191017▻Young Call Girls In Guru Dronacharya Metro Station Delhi NCRCall Us ➥9911191017▻Young Call Girls In Guru Dronacharya Metro Station Delhi NCR
Call Us ➥9911191017▻Young Call Girls In Guru Dronacharya Metro Station Delhi NCRsafdarjungdelhi1
 
Justdial Call Girls In Moolchand Metro Delhi 9911191017 Escorts Service
Justdial Call Girls In Moolchand Metro Delhi 9911191017 Escorts ServiceJustdial Call Girls In Moolchand Metro Delhi 9911191017 Escorts Service
Justdial Call Girls In Moolchand Metro Delhi 9911191017 Escorts Servicesafdarjungdelhi1
 
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts ServiceBook Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Servicemonikaservice1
 
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...gitathapa4
 
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)riyaescorts54
 
FULL ENJOY Call Girls In Gurgaon Call 8588836666 Escorts Service
FULL ENJOY Call Girls In Gurgaon  Call 8588836666 Escorts ServiceFULL ENJOY Call Girls In Gurgaon  Call 8588836666 Escorts Service
FULL ENJOY Call Girls In Gurgaon Call 8588836666 Escorts ServiceCALLGIRLS DELHI
 
▶ ●─Hookup Call Girls In Noida Sector 9 (Noida) ⎝9667422720⎠ Delhi Female Esc...
▶ ●─Hookup Call Girls In Noida Sector 9 (Noida) ⎝9667422720⎠ Delhi Female Esc...▶ ●─Hookup Call Girls In Noida Sector 9 (Noida) ⎝9667422720⎠ Delhi Female Esc...
▶ ●─Hookup Call Girls In Noida Sector 9 (Noida) ⎝9667422720⎠ Delhi Female Esc...Lipikasharma29
 
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts ServiceCall Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts ServiceLipikasharma29
 
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...Lipikasharma29
 
Trusted Call~Girls In Shahdara Delhi ꧁❤ 9667422720 ❤꧂Escorts
Trusted Call~Girls In Shahdara Delhi ꧁❤ 9667422720 ❤꧂EscortsTrusted Call~Girls In Shahdara Delhi ꧁❤ 9667422720 ❤꧂Escorts
Trusted Call~Girls In Shahdara Delhi ꧁❤ 9667422720 ❤꧂EscortsLipikasharma29
 

Dernier (20)

9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
 
Delhi Escort Service [Today√√ 8800357707 √√ Sexy VIP Call Girls Aerocity
Delhi Escort Service [Today√√ 8800357707 √√ Sexy VIP Call Girls AerocityDelhi Escort Service [Today√√ 8800357707 √√ Sexy VIP Call Girls Aerocity
Delhi Escort Service [Today√√ 8800357707 √√ Sexy VIP Call Girls Aerocity
 
Book Call Girls in Anand Vihar Delhi 8800357707 Escorts Service
Book Call Girls in Anand Vihar Delhi 8800357707 Escorts ServiceBook Call Girls in Anand Vihar Delhi 8800357707 Escorts Service
Book Call Girls in Anand Vihar Delhi 8800357707 Escorts Service
 
Trusted Call~Girls In Rohini Delhi꧁❤ 9667422720 ❤꧂Escorts
Trusted Call~Girls In Rohini Delhi꧁❤ 9667422720 ❤꧂EscortsTrusted Call~Girls In Rohini Delhi꧁❤ 9667422720 ❤꧂Escorts
Trusted Call~Girls In Rohini Delhi꧁❤ 9667422720 ❤꧂Escorts
 
9643097474 Full Enjoy @24/7 Call Girls In Mahipalpur Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Mahipalpur Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Mahipalpur Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Mahipalpur Delhi Ncr
 
Call Girls In Lajpat Nagar Delhi➥9911191017 High Class Escorts In 24/7 Delhi NCR
Call Girls In Lajpat Nagar Delhi➥9911191017 High Class Escorts In 24/7 Delhi NCRCall Girls In Lajpat Nagar Delhi➥9911191017 High Class Escorts In 24/7 Delhi NCR
Call Girls In Lajpat Nagar Delhi➥9911191017 High Class Escorts In 24/7 Delhi NCR
 
Tibetan Call Girls In Majnu Ka Tilla Delhi 9911107661
Tibetan Call Girls In Majnu Ka Tilla Delhi 9911107661Tibetan Call Girls In Majnu Ka Tilla Delhi 9911107661
Tibetan Call Girls In Majnu Ka Tilla Delhi 9911107661
 
9953056974 Low Rate Call Girls Delhi NCR
9953056974 Low Rate Call Girls Delhi NCR9953056974 Low Rate Call Girls Delhi NCR
9953056974 Low Rate Call Girls Delhi NCR
 
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
 
Call Girl In Malviya Nagar Delhi 9711800081 Escort Service
Call Girl In Malviya Nagar Delhi 9711800081  Escort ServiceCall Girl In Malviya Nagar Delhi 9711800081  Escort Service
Call Girl In Malviya Nagar Delhi 9711800081 Escort Service
 
Call Us ➥9911191017▻Young Call Girls In Guru Dronacharya Metro Station Delhi NCR
Call Us ➥9911191017▻Young Call Girls In Guru Dronacharya Metro Station Delhi NCRCall Us ➥9911191017▻Young Call Girls In Guru Dronacharya Metro Station Delhi NCR
Call Us ➥9911191017▻Young Call Girls In Guru Dronacharya Metro Station Delhi NCR
 
Justdial Call Girls In Moolchand Metro Delhi 9911191017 Escorts Service
Justdial Call Girls In Moolchand Metro Delhi 9911191017 Escorts ServiceJustdial Call Girls In Moolchand Metro Delhi 9911191017 Escorts Service
Justdial Call Girls In Moolchand Metro Delhi 9911191017 Escorts Service
 
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts ServiceBook Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
 
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
 
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
 
FULL ENJOY Call Girls In Gurgaon Call 8588836666 Escorts Service
FULL ENJOY Call Girls In Gurgaon  Call 8588836666 Escorts ServiceFULL ENJOY Call Girls In Gurgaon  Call 8588836666 Escorts Service
FULL ENJOY Call Girls In Gurgaon Call 8588836666 Escorts Service
 
▶ ●─Hookup Call Girls In Noida Sector 9 (Noida) ⎝9667422720⎠ Delhi Female Esc...
▶ ●─Hookup Call Girls In Noida Sector 9 (Noida) ⎝9667422720⎠ Delhi Female Esc...▶ ●─Hookup Call Girls In Noida Sector 9 (Noida) ⎝9667422720⎠ Delhi Female Esc...
▶ ●─Hookup Call Girls In Noida Sector 9 (Noida) ⎝9667422720⎠ Delhi Female Esc...
 
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts ServiceCall Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
 
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
 
Trusted Call~Girls In Shahdara Delhi ꧁❤ 9667422720 ❤꧂Escorts
Trusted Call~Girls In Shahdara Delhi ꧁❤ 9667422720 ❤꧂EscortsTrusted Call~Girls In Shahdara Delhi ꧁❤ 9667422720 ❤꧂Escorts
Trusted Call~Girls In Shahdara Delhi ꧁❤ 9667422720 ❤꧂Escorts
 

The smartpath information systems c plus plus

  • 1. C++ Programming Basic Learning Prepared By The Smartpath Information systems www.thesmartpath.in
  • 2. Index 1. About C++ Programming Language 2. Basic Concepts of OOPs 3. Basic Concepts of OOPs(continue….) 4. Basic Concepts of OOPs(continue….) 5. Basic Concepts of OOPs(continue….) 6. Benefits 7. Languages with Object Oriented Features 8. C++ Programming Environment 9. C++ Program Structure 10.C++ Program Structure (Explanation) 11.Creating Class and Objects 12.Explanation
  • 3. Index 14 . C++ Program Syntax 15. Keywords 16. Data Types 17. Operators in C++ 18. Operators in C++ (continue….) 19. Variables 20. Working With Classes 21. Feature of OOP - Inheritance 22. Types of Inheritance 23. Polymorphism - Operator Overloading 24. Operators that cannot be overloaded 25. OOPs Applications
  • 4. About C++ programming language C++ is an object-oriented programming language developed by Bjarne Stroustrup at AT&T Bell Lab in the year 1980. Initially it was named “C with classes” but later in 1983 the name changed to C++. It is an extension of C with major addition of classes. It supports concepts of Object Oriented Programming known as OOP concepts C++ can be said as superset of C. It provides bottom-up and object oriented design.
  • 5. Basic concepts of object oriented programming Objects Object is an entity in program. They are also called class variables. An object represents real world things such as person, student, etc Objects contain data and methods in it. When object is created in a program memory is allotted to a program. Class Class is a user-defined data type which holds data and program code. It is collection of objects of similar type.
  • 6. Concepts of object oriented programming Encapsulation The wrapping up of data and functions in a class is known as encapsulation. The functions inside class can use the data within it. It is not accessible outside world directly only function who is member of class or friend function can access data. Data Abstraction Abstraction is hiding details of a process and presenting essential features to the user. By creating a class and putting data and methods in it. We use objects to access.
  • 7. Concepts of object oriented programming Inheritance The feature of inheritance provides reusability of class. This is a process through Which a class acquires the properties of another class. The class which is created By inheritance is called derived class , and class whose features are inherited is Called base class Polymorphism It is the feature that gives ability to take different forms. To behave differently in different forms. It is done through operator overloading. An operator has one or more behavior. With same name it acts differently
  • 8. Concepts of object oriented programming Dynamic Binding binding is done as compiler does not know what are functions in a program. It gets to know when binding or linking of code and function is done either at run time or compile time. Run time binding is called as dynamic binding or early binding. It is linking of code and function at the run time. Also called late binding. In early binding or compile time binding function and code are linked when file is compiled Message passing Just as people communicate with each other . Objects also communicate with each other through message passing. They send and receive information with] each other. When object gets message it invokes a procedure in it and generate results of the procedure call.
  • 9. Benefits Benefits of OOP  object oriented systems can easily be upgraded from small to large systems  software complexity can be easily managed  Through Inheritance classes once created can be used again as required  Through abstraction and data hiding. Data is secure.
  • 10. languages with object oriented features 1. C++ 2. JAVA 3. C# 4. Falcon 5. Delphi 6. Objective C 7. Python 8. PHP5 9. Perl
  • 11. C++ programming Environment C++ Programming Environment consists of Text Editor and C++ compiler (1) Text Editor - Programs are typed in Text Editor . By default a new file Noname.cpp is opened. Type your programs here , save it , compile and run. (2) Compiler – Compiler is a System software that is installed on computer to compile and run programs. Most widely Turbo C compiler is used
  • 12. C++ program Structure A C++ program consists of the following 1. Class 2. Methods 3. Object 4. Instance Variables For Example creating a class #include< iostream.h> int main( ) { statements; getch(); return 0; }
  • 13. C++ program Structure Explained 1. #include - This statement adds the necessary header file iostream.h to the program. It contains methods for input and output in a program 2 int main() – The program execution starts with main method. 3. Type the statements inside main( ) method. . 4. getch() – marks the end of program and returns to programming window 5. return 0- In C++ main() method is of int type, it is not necessary to return a value always so we take return 0; statement.
  • 14. Creating Class and objects in C++ Example of class and object #include<iostream.h> Class sample // class named Sample { public: int a; // instance variable void get() // member method }; Int main( ) { sample S; // method is called using object S S.get(); }
  • 15. Explanation 1. Class is created using class ‘keyword’ 2. Class has name Sample it has instance variable in which data is stored 3. It has member method called get() . It can access the data in it. 4. main() method is defined. 5. An Object of class is created in main() 6. method of class is called using object of class
  • 16. C++ program Syntax 1. In Each Program header file iostream.h is included in the beginning 2. put semicolon at the end of each statement 3. When using classes create class and put semicolon at the closing bracket 4. method are called member methods and variables are called data member 5. The main method is of type int. ie.. Int main() is used in programs 6. Getch() is placed before return 0; 7. Return 0; statement is necessary because main has return type int. 8. Comments are given after two slashes as // comments 9. comments are not executed they are used to enhance readability of program
  • 19. Operators in C++ 1. Arithmetic operators 2. Relational operators addition + Equals == subtraction - Not Equal != Multiplication * Greater than > Division / Greater than equal to >= Modulus % Less than < Less than equal to <=
  • 20. Operators in C++ 3 . Logical operators logical AND && logical OR || logical NOT ! 4. Scope Resolution Operator - :: 5. Memory allocation operator - new 6. Memory release operator - delete 7. Line feed operator - endl 8. Field Width operator - setw()
  • 21. Variables Variables in C++ is valid name in the memory where input given by user is stored and the result of program is stored. When a variable is declared in program , it occupies space in memory according to its size. Such as integer type takes 2 bytes of memory, char type takes 1 byte of memory Example : #include<iostream.h> int main() { int a; float b; }
  • 22. Working with Classes A class definition starts with the keyword class followed by the class name; and the class body, enclosed by a pair of curly braces. A class definition must be followed either by a semicolon or a list of declarations. The keyword public determines the access attributes of the members of the class that follow it. A public member can be accessed from outside the class anywhere within the scope of the class object. You can also specify the members of a class as private or protected . Private member cannot be accessed out side the class. Only the public member method of a class can access private data and method Protected – It determines the scope up to a single level of inheritance
  • 23. Feature of OOPs - Inheritance Inheritance Inheritance is using the previously defined class as required Base Class – The Class which is used for deriving a new class and whose features are used by it , is called Base class. Derived Class- The newly formed class which contains features of base class and also contains features of its own
  • 25. Polymorphism – operator overloading Polymorphism It is achieved through operator overloading. With this we can create new definition of the operators by giving special meaning to them. Syntax: <return type> class name : : operator (arguments) { statements; } Example: void sample : : + operator() { x = +x; y = +y; }
  • 26. Operators that cannot be overloaded 1. Class member access operators - ( dot . , *) 2. Scope resolution operator - :: 3. Size operator - sizeof( ) 4. Conditional operator - ? :
  • 27. Oops Applications 1. Real Time Systems 2. Simulation and Modeling 3. Object Oriented Databases 4. Hypertext , hypermedia 5. Decision Support Systems 6. Office Automation Systems 7. CAD / CAM Systems