SlideShare a Scribd company logo
PROGRAMMING IN C++
A.Sujatha. M.Sc.,M.Phil.,P.G.D.C.A,
M.Mohana Malar. M.Sc., M.Phil,
Object Oriented Programming
Object Oriented programming treats
data as a critical element in the program
development and does not allow it to flow freely
around the system. OOP allows decomposition
of a problem into a number of entities called
objects and then builds data and functions
around these objects.
Basic Concepts of OOP
Objects
Classes
Data abstraction and encapsulation
Inheritance
Polymorphism
Dynamic binding
Message passing
Basic Data Types
User Defined type
Structure
Union
Class
Enumeration
Built in type
IntegralType
Int
Char
Void
FloatingType
Float
Double
Derived type
Array
Function
Pointer
Reference
Function
Dividing a program into functions is
one of the major principles of top-down,
structured programming. Another
advantage of using functions is that it is
possible to reduce the size of a program
by calling and using them at different
places in the program
Function Prototyping
The prototype describes the
function interface to the compiler by giving
details such as the number and type of
arguments and the type of return values.
Function prototype is a declaration
statement in the calling program and is of
the following form:
type function- name (argument-list);
Inline Function
One of the objectives of using
functions in a program is to save some memory
space, which becomes appreciable when a
function is likely to be called many times. One
solution to this problem is to use macro
definitions, popularly known s macros. C++ has
a different solution to this problem. To eliminate
the cost of calls to small functions, C++
proposes a new feature called inline function.
Inline Function
When a function is declared inline the compiler
replaces the function call with the respective
function code. Normally, a small size function is
made as inline.
Function Overloading
Overloading refers to the use of the
same thing for different purposes. This means
that we can use the same function name to
create functions that perform a variety of
different tasks. This is known as function
prototyping. Here, the function would perform
different operations depending on the argument
list in the function call
Thank you
Ad

More Related Content

What's hot (20)

C presentation
C presentationC presentation
C presentation
APSMIND TECHNOLOGY PVT LTD.
 
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
Nithin Kumar,VVCE, Mysuru
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
vikram mahendra
 
Preprocessor
PreprocessorPreprocessor
Preprocessor
Learn By Watch
 
Software Engineering Solved Past Paper 2020
Software Engineering Solved Past Paper 2020 Software Engineering Solved Past Paper 2020
Software Engineering Solved Past Paper 2020
MuhammadTalha436
 
GE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingGE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python Programming
Muthu Vinayagam
 
Strings
StringsStrings
Strings
Mitali Chugh
 
Oop lec 2(introduction to object oriented technology)
Oop lec 2(introduction to object oriented technology)Oop lec 2(introduction to object oriented technology)
Oop lec 2(introduction to object oriented technology)
Asfand Hassan
 
c++ lab manual
c++ lab manualc++ lab manual
c++ lab manual
Shrunkhala Wankhede
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
satvirsandhu9
 
系統程式 -- 第 11 章 嵌入式系統
系統程式 -- 第 11 章 嵌入式系統系統程式 -- 第 11 章 嵌入式系統
系統程式 -- 第 11 章 嵌入式系統
鍾誠 陳鍾誠
 
Coding
CodingCoding
Coding
Vishal Singh
 
Technical questions
Technical questionsTechnical questions
Technical questions
Kirthan S Holla
 
C programming
C programmingC programming
C programming
Envision Computer Training Institute
 
Function in c program
Function in c programFunction in c program
Function in c program
umesh patil
 
Software development slides
Software development slidesSoftware development slides
Software development slides
iarthur
 
Telephone directory in c
Telephone directory in cTelephone directory in c
Telephone directory in c
Upendra Sengar
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
Jussi Pohjolainen
 
Presentation on C programming language
Presentation on C programming languagePresentation on C programming language
Presentation on C programming language
Ashmita Tuition Center
 
C program to implement linked list using array abstract data type
C program to implement linked list using array abstract data typeC program to implement linked list using array abstract data type
C program to implement linked list using array abstract data type
loyola ICAM college of engineering and technology
 
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
VTU Design and Analysis of Algorithms(DAA) Lab Manual by Nithin, VVCE, Mysuru...
Nithin Kumar,VVCE, Mysuru
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
vikram mahendra
 
Software Engineering Solved Past Paper 2020
Software Engineering Solved Past Paper 2020 Software Engineering Solved Past Paper 2020
Software Engineering Solved Past Paper 2020
MuhammadTalha436
 
GE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python ProgrammingGE8151 Problem Solving and Python Programming
GE8151 Problem Solving and Python Programming
Muthu Vinayagam
 
Oop lec 2(introduction to object oriented technology)
Oop lec 2(introduction to object oriented technology)Oop lec 2(introduction to object oriented technology)
Oop lec 2(introduction to object oriented technology)
Asfand Hassan
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
satvirsandhu9
 
系統程式 -- 第 11 章 嵌入式系統
系統程式 -- 第 11 章 嵌入式系統系統程式 -- 第 11 章 嵌入式系統
系統程式 -- 第 11 章 嵌入式系統
鍾誠 陳鍾誠
 
Function in c program
Function in c programFunction in c program
Function in c program
umesh patil
 
Software development slides
Software development slidesSoftware development slides
Software development slides
iarthur
 
Telephone directory in c
Telephone directory in cTelephone directory in c
Telephone directory in c
Upendra Sengar
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
Jussi Pohjolainen
 
Presentation on C programming language
Presentation on C programming languagePresentation on C programming language
Presentation on C programming language
Ashmita Tuition Center
 

Similar to Programming in c++ ppt (20)

object oriented programming language in c++
object oriented programming language in c++object oriented programming language in c++
object oriented programming language in c++
Ravikant517175
 
Functions in c
Functions in cFunctions in c
Functions in c
reshmy12
 
Function in c programming
Function in c programmingFunction in c programming
Function in c programming
SayeemAhmed8
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
Amresh Raj
 
Functions in c++, presentation, short and sweet presentation, and details of ...
Functions in c++, presentation, short and sweet presentation, and details of ...Functions in c++, presentation, short and sweet presentation, and details of ...
Functions in c++, presentation, short and sweet presentation, and details of ...
Sar
 
Function
FunctionFunction
Function
rishabh agrawal
 
Chapter One Function.pptx
Chapter One Function.pptxChapter One Function.pptx
Chapter One Function.pptx
miki304759
 
Presentation 2.pptx
Presentation 2.pptxPresentation 2.pptx
Presentation 2.pptx
ziyadaslanbey
 
C functions by ranjan call by value and reference.pptx
C functions by ranjan call by value and reference.pptxC functions by ranjan call by value and reference.pptx
C functions by ranjan call by value and reference.pptx
ranjan317165
 
LECTURE NOTES ON Object Oriented Programming Using C++
LECTURE NOTES ON Object Oriented Programming Using C++LECTURE NOTES ON Object Oriented Programming Using C++
LECTURE NOTES ON Object Oriented Programming Using C++
SandeepAwasthi15
 
Function
FunctionFunction
Function
Rajat Patel
 
Lecture_5_-_Functions_in_C_Detailed.pptx
Lecture_5_-_Functions_in_C_Detailed.pptxLecture_5_-_Functions_in_C_Detailed.pptx
Lecture_5_-_Functions_in_C_Detailed.pptx
Salim Shadman Ankur
 
Programming in C FUNCTION Basic concepts.pptx
Programming in C FUNCTION Basic concepts.pptxProgramming in C FUNCTION Basic concepts.pptx
Programming in C FUNCTION Basic concepts.pptx
vengaimarbhan1
 
Unit 1
Unit  1Unit  1
Unit 1
donny101
 
Oop in c++ lecture 1
Oop in c++  lecture 1Oop in c++  lecture 1
Oop in c++ lecture 1
zk75977
 
c.p function
c.p functionc.p function
c.p function
giri5624
 
Functional Paradigm.pptx
Functional Paradigm.pptxFunctional Paradigm.pptx
Functional Paradigm.pptx
FurretMaster
 
Modular Programming in C
Modular Programming in CModular Programming in C
Modular Programming in C
bhawna kol
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroduction
Rai University
 
Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastactures
K.s. Ramesh
 
object oriented programming language in c++
object oriented programming language in c++object oriented programming language in c++
object oriented programming language in c++
Ravikant517175
 
Functions in c
Functions in cFunctions in c
Functions in c
reshmy12
 
Function in c programming
Function in c programmingFunction in c programming
Function in c programming
SayeemAhmed8
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
Amresh Raj
 
Functions in c++, presentation, short and sweet presentation, and details of ...
Functions in c++, presentation, short and sweet presentation, and details of ...Functions in c++, presentation, short and sweet presentation, and details of ...
Functions in c++, presentation, short and sweet presentation, and details of ...
Sar
 
Chapter One Function.pptx
Chapter One Function.pptxChapter One Function.pptx
Chapter One Function.pptx
miki304759
 
C functions by ranjan call by value and reference.pptx
C functions by ranjan call by value and reference.pptxC functions by ranjan call by value and reference.pptx
C functions by ranjan call by value and reference.pptx
ranjan317165
 
LECTURE NOTES ON Object Oriented Programming Using C++
LECTURE NOTES ON Object Oriented Programming Using C++LECTURE NOTES ON Object Oriented Programming Using C++
LECTURE NOTES ON Object Oriented Programming Using C++
SandeepAwasthi15
 
Lecture_5_-_Functions_in_C_Detailed.pptx
Lecture_5_-_Functions_in_C_Detailed.pptxLecture_5_-_Functions_in_C_Detailed.pptx
Lecture_5_-_Functions_in_C_Detailed.pptx
Salim Shadman Ankur
 
Programming in C FUNCTION Basic concepts.pptx
Programming in C FUNCTION Basic concepts.pptxProgramming in C FUNCTION Basic concepts.pptx
Programming in C FUNCTION Basic concepts.pptx
vengaimarbhan1
 
Oop in c++ lecture 1
Oop in c++  lecture 1Oop in c++  lecture 1
Oop in c++ lecture 1
zk75977
 
c.p function
c.p functionc.p function
c.p function
giri5624
 
Functional Paradigm.pptx
Functional Paradigm.pptxFunctional Paradigm.pptx
Functional Paradigm.pptx
FurretMaster
 
Modular Programming in C
Modular Programming in CModular Programming in C
Modular Programming in C
bhawna kol
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroduction
Rai University
 
Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastactures
K.s. Ramesh
 
Ad

More from MalarMohana (8)

Dynamics
Dynamics Dynamics
Dynamics
MalarMohana
 
Dynamics slideshare
Dynamics slideshareDynamics slideshare
Dynamics slideshare
MalarMohana
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
MalarMohana
 
Dynamics
Dynamics Dynamics
Dynamics
MalarMohana
 
Numerical analysis
Numerical analysis Numerical analysis
Numerical analysis
MalarMohana
 
Statistics and operations research ppt
Statistics and operations research pptStatistics and operations research ppt
Statistics and operations research ppt
MalarMohana
 
Numerical analysis ppt
Numerical analysis pptNumerical analysis ppt
Numerical analysis ppt
MalarMohana
 
Dynamics
Dynamics Dynamics
Dynamics
MalarMohana
 
Dynamics slideshare
Dynamics slideshareDynamics slideshare
Dynamics slideshare
MalarMohana
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
MalarMohana
 
Numerical analysis
Numerical analysis Numerical analysis
Numerical analysis
MalarMohana
 
Statistics and operations research ppt
Statistics and operations research pptStatistics and operations research ppt
Statistics and operations research ppt
MalarMohana
 
Numerical analysis ppt
Numerical analysis pptNumerical analysis ppt
Numerical analysis ppt
MalarMohana
 
Ad

Recently uploaded (20)

Envenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptxEnvenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptx
rekhapositivity
 
Unit 5: Dividend Decisions and its theories
Unit 5: Dividend Decisions and its theoriesUnit 5: Dividend Decisions and its theories
Unit 5: Dividend Decisions and its theories
bharath321164
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Timber Pitch Roof Construction Measurement-2024.pptx
Timber Pitch Roof Construction Measurement-2024.pptxTimber Pitch Roof Construction Measurement-2024.pptx
Timber Pitch Roof Construction Measurement-2024.pptx
Tantish QS, UTM
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Fundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic CommunicationsFundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic Communications
Jordan Williams
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Envenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptxEnvenomation---Clinical Toxicology. pptx
Envenomation---Clinical Toxicology. pptx
rekhapositivity
 
Unit 5: Dividend Decisions and its theories
Unit 5: Dividend Decisions and its theoriesUnit 5: Dividend Decisions and its theories
Unit 5: Dividend Decisions and its theories
bharath321164
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Timber Pitch Roof Construction Measurement-2024.pptx
Timber Pitch Roof Construction Measurement-2024.pptxTimber Pitch Roof Construction Measurement-2024.pptx
Timber Pitch Roof Construction Measurement-2024.pptx
Tantish QS, UTM
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
Fundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic CommunicationsFundamentals of PR: Wk 4 - Strategic Communications
Fundamentals of PR: Wk 4 - Strategic Communications
Jordan Williams
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 

Programming in c++ ppt

  • 1. PROGRAMMING IN C++ A.Sujatha. M.Sc.,M.Phil.,P.G.D.C.A, M.Mohana Malar. M.Sc., M.Phil,
  • 2. Object Oriented Programming Object Oriented programming treats data as a critical element in the program development and does not allow it to flow freely around the system. OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects.
  • 3. Basic Concepts of OOP Objects Classes Data abstraction and encapsulation Inheritance Polymorphism Dynamic binding Message passing
  • 4. Basic Data Types User Defined type Structure Union Class Enumeration Built in type IntegralType Int Char Void FloatingType Float Double Derived type Array Function Pointer Reference
  • 5. Function Dividing a program into functions is one of the major principles of top-down, structured programming. Another advantage of using functions is that it is possible to reduce the size of a program by calling and using them at different places in the program
  • 6. Function Prototyping The prototype describes the function interface to the compiler by giving details such as the number and type of arguments and the type of return values. Function prototype is a declaration statement in the calling program and is of the following form: type function- name (argument-list);
  • 7. Inline Function One of the objectives of using functions in a program is to save some memory space, which becomes appreciable when a function is likely to be called many times. One solution to this problem is to use macro definitions, popularly known s macros. C++ has a different solution to this problem. To eliminate the cost of calls to small functions, C++ proposes a new feature called inline function.
  • 8. Inline Function When a function is declared inline the compiler replaces the function call with the respective function code. Normally, a small size function is made as inline.
  • 9. Function Overloading Overloading refers to the use of the same thing for different purposes. This means that we can use the same function name to create functions that perform a variety of different tasks. This is known as function prototyping. Here, the function would perform different operations depending on the argument list in the function call