SlideShare a Scribd company logo
1 of 3
Download to read offline
INLINE FUNCTION Lecture 2.3
Prepared by: Mian Saeed Akbar
Inline function
 Keyword inline before function
 Asks the compiler to copy code into program instead of making function call
 Reduce function-call overhead
 Compiler can ignore inline
 Good for small, often-used functions
inline double cube(double s ){
return s * s * s;
}
Thank you
Please subscribe my channel for more videos
and courses

More Related Content

More from MianSaeedAkbar1

Lecture 2.1 Functions.pdf
Lecture 2.1 Functions.pdfLecture 2.1 Functions.pdf
Lecture 2.1 Functions.pdfMianSaeedAkbar1
 
Lecture 1.5 Variables.pdf
Lecture 1.5 Variables.pdfLecture 1.5 Variables.pdf
Lecture 1.5 Variables.pdfMianSaeedAkbar1
 
Lecture 1.2 Basics of a typical C++ Environment.pdf
Lecture 1.2 Basics of a typical C++ Environment.pdfLecture 1.2 Basics of a typical C++ Environment.pdf
Lecture 1.2 Basics of a typical C++ Environment.pdfMianSaeedAkbar1
 
Lecture 1.8 Conditional Structures.pdf
Lecture 1.8 Conditional Structures.pdfLecture 1.8 Conditional Structures.pdf
Lecture 1.8 Conditional Structures.pdfMianSaeedAkbar1
 
Lecture 2.7 Type Conversion in C++.pdf
Lecture 2.7 Type Conversion in C++.pdfLecture 2.7 Type Conversion in C++.pdf
Lecture 2.7 Type Conversion in C++.pdfMianSaeedAkbar1
 
Lecture 1.6 Arithmetic and Relational Operators.pdf
Lecture 1.6 Arithmetic and Relational Operators.pdfLecture 1.6 Arithmetic and Relational Operators.pdf
Lecture 1.6 Arithmetic and Relational Operators.pdfMianSaeedAkbar1
 
Lecture 1.7 C++ Keywords.pdf
Lecture 1.7 C++ Keywords.pdfLecture 1.7 C++ Keywords.pdf
Lecture 1.7 C++ Keywords.pdfMianSaeedAkbar1
 
Lecture 1.4 Escape Sequence.pdf
Lecture 1.4 Escape Sequence.pdfLecture 1.4 Escape Sequence.pdf
Lecture 1.4 Escape Sequence.pdfMianSaeedAkbar1
 
Lecture 1.9 Switch Structure.pdf
Lecture 1.9 Switch Structure.pdfLecture 1.9 Switch Structure.pdf
Lecture 1.9 Switch Structure.pdfMianSaeedAkbar1
 
Lecture 1.10 Repetition Structures.pdf
Lecture 1.10 Repetition Structures.pdfLecture 1.10 Repetition Structures.pdf
Lecture 1.10 Repetition Structures.pdfMianSaeedAkbar1
 
Lecture 0 Object Oriented Programming.pdf
Lecture 0 Object Oriented Programming.pdfLecture 0 Object Oriented Programming.pdf
Lecture 0 Object Oriented Programming.pdfMianSaeedAkbar1
 
Lecture 1.1 Introduction to Computer Languages.pdf
Lecture 1.1 Introduction to Computer Languages.pdfLecture 1.1 Introduction to Computer Languages.pdf
Lecture 1.1 Introduction to Computer Languages.pdfMianSaeedAkbar1
 

More from MianSaeedAkbar1 (12)

Lecture 2.1 Functions.pdf
Lecture 2.1 Functions.pdfLecture 2.1 Functions.pdf
Lecture 2.1 Functions.pdf
 
Lecture 1.5 Variables.pdf
Lecture 1.5 Variables.pdfLecture 1.5 Variables.pdf
Lecture 1.5 Variables.pdf
 
Lecture 1.2 Basics of a typical C++ Environment.pdf
Lecture 1.2 Basics of a typical C++ Environment.pdfLecture 1.2 Basics of a typical C++ Environment.pdf
Lecture 1.2 Basics of a typical C++ Environment.pdf
 
Lecture 1.8 Conditional Structures.pdf
Lecture 1.8 Conditional Structures.pdfLecture 1.8 Conditional Structures.pdf
Lecture 1.8 Conditional Structures.pdf
 
Lecture 2.7 Type Conversion in C++.pdf
Lecture 2.7 Type Conversion in C++.pdfLecture 2.7 Type Conversion in C++.pdf
Lecture 2.7 Type Conversion in C++.pdf
 
Lecture 1.6 Arithmetic and Relational Operators.pdf
Lecture 1.6 Arithmetic and Relational Operators.pdfLecture 1.6 Arithmetic and Relational Operators.pdf
Lecture 1.6 Arithmetic and Relational Operators.pdf
 
Lecture 1.7 C++ Keywords.pdf
Lecture 1.7 C++ Keywords.pdfLecture 1.7 C++ Keywords.pdf
Lecture 1.7 C++ Keywords.pdf
 
Lecture 1.4 Escape Sequence.pdf
Lecture 1.4 Escape Sequence.pdfLecture 1.4 Escape Sequence.pdf
Lecture 1.4 Escape Sequence.pdf
 
Lecture 1.9 Switch Structure.pdf
Lecture 1.9 Switch Structure.pdfLecture 1.9 Switch Structure.pdf
Lecture 1.9 Switch Structure.pdf
 
Lecture 1.10 Repetition Structures.pdf
Lecture 1.10 Repetition Structures.pdfLecture 1.10 Repetition Structures.pdf
Lecture 1.10 Repetition Structures.pdf
 
Lecture 0 Object Oriented Programming.pdf
Lecture 0 Object Oriented Programming.pdfLecture 0 Object Oriented Programming.pdf
Lecture 0 Object Oriented Programming.pdf
 
Lecture 1.1 Introduction to Computer Languages.pdf
Lecture 1.1 Introduction to Computer Languages.pdfLecture 1.1 Introduction to Computer Languages.pdf
Lecture 1.1 Introduction to Computer Languages.pdf
 

Recently uploaded

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 

Recently uploaded (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

Lecture 2.3 Inline Function.pdf

  • 1. INLINE FUNCTION Lecture 2.3 Prepared by: Mian Saeed Akbar
  • 2. Inline function  Keyword inline before function  Asks the compiler to copy code into program instead of making function call  Reduce function-call overhead  Compiler can ignore inline  Good for small, often-used functions inline double cube(double s ){ return s * s * s; }
  • 3. Thank you Please subscribe my channel for more videos and courses