SlideShare a Scribd company logo
1 of 5
Download to read offline
www.cppforschool.com
C++ Standard Library Function
The C++ Standard Library provides a rich collection of functions for performing
common mathematical calculations, string manipulations, character manipulations,
input/output, error checking and many other useful operations. This makes the
programmer's job easier, because these functions provide many of the capabilities
programmers need. The C++ Standard Library functions are provided as part of the
C++ programming environment.
Header file names ending in .h are "old-style" header files that have been
superseded by the C++ Standard Library header files.
C++ Standard
Library header
file Explanation
<iostream> Contains function prototypes for the C++ standard input and
standard output functions. This header file replaces header file
<iostream.h>.
<iomanip> Contains function prototypes for stream manipulators that format
streams of data. This header file replaces header file <iomanip.h>.
<cmath> Contains function prototypes for math library functions. This
header file replaces header file <math.h>.
<cstdlib> Contains function prototypes for conversions of numbers to text,
text to numbers, memory allocation, random numbers and various
other utility functions. This header file replaces header file
<stdlib.h>.
<ctime> Contains function prototypes and types for manipulating the time
and date. This header file replaces header file <time.h>.
<cctype> Contains function prototypes for functions that test characters for
certain properties (such as whether the character is a digit or a
punctuation), and function prototypes for functions that can be
used to convert lowercase letters to uppercase letters and vice
versa. This header file replaces header file <ctype.h>
<cstring> Contains function prototypes for C-style string-processing
functions. This header file replaces header file <string.h>.
<cstdio> Contains function prototypes for the C-style standard input/output
library functions and information used by them. This header file
replaces header file <stdio.h>.
<fstream> Contains function prototypes for functions that perform input from
files on disk and output to files on disk. This header file replaces
header file <fstream.h>.
<climits> Contains the integral size limits of the system. This header file
replaces header file <limits.h>.
<cassert> Contains macros for adding diagnostics that aid program
debugging. This replaces header file <assert.h> from pre-standard
C++.
<cfloat> Contains the floating-point size limits of the system. This header
file replaces header file <float.h>.
<string> Contains the definition of class string from the C++ Standard
Library
<vector>,
<list>,
<deque>,
<queue>,
<stack>,
<map>,
<set>,
<bitset>
These header files contain classes that implement the C++
Standard Library containers. Containers store data during a
program's execution.
<typeinfo> Contains classes for runtime type identification (determining data
types at execution time).
<exception>,
<stdexcept>
These header files contain classes that are used for exception
handling.
<memory> Contains classes and functions used by the C++ Standard Library
to allocate memory to the C++ Standard Library containers.
<sstream> Contains function prototypes for functions that perform input from
strings in memory and output to strings in memory.
<functional> Contains classes and functions used by C++ Standard Library
algorithms.
<iterator> Contains classes for accessing data in the C++ Standard Library
containers.
<algorithm> Contains functions for manipulating data in C++ Standard Library
containers.
<locale> Contains classes and functions normally used by stream
processing to process data in the natural form for different
languages (e.g., monetary formats, sorting strings, character
presentation, etc.).
<limits> Contains classes for defining the numerical data type limits on
each computer platform.
<utility> Contains classes and functions that are used by many C++
Standard Library header files.
Mathematical Functions
Some of the important mathematical functions in header file <cmath> are
Function Meaning
sin(x) Sine of an angle x (measured in radians)
cos(x) Cosine of an angle x (measured in radians)
tan(x) Tangent of an angle x (measured in radians)
asin(x) Sin-1 (x) where x (measured in radians)
acos(x) Cos-1 (x) where x (measured in radians)
exp(x) Exponential function of x (ex)
log(x) logarithm of x
log 10(x) Logarithm of number x to the base 10
sqrt(x) Square root of x
pow(x, y) x raised to the power y
abs(x) Absolute value of integer number x
fabs(x) Absolute value of real number x
Character Functions
All the character functions require <cctype> header file. The following table lists the
function.
Function Meaning
isalpha(c)
It returns True if C is an uppercase letter and False if c
is lowercase.
isdigit(c)
It returns True if c is a digit (0 through 9) otherwise
False.
isalnum(c)
It returns True if c is a digit from 0 through 9 or an
alphabetic character (either uppercase or lowercase)
otherwise False.
islower(c) It returns True if C is a lowercase letter otherwise False.
isupper(c)
It returns True if C is an uppercase letter otherwise
False.
toupper(c) It converts c to uppercase letter.
tolower(c) It converts c to lowercase letter.

More Related Content

What's hot

What's hot (20)

C programming
C programmingC programming
C programming
 
Array, string and pointer
Array, string and pointerArray, string and pointer
Array, string and pointer
 
Iostream in c++
Iostream in c++Iostream in c++
Iostream in c++
 
STL ALGORITHMS
STL ALGORITHMSSTL ALGORITHMS
STL ALGORITHMS
 
Modern C++
Modern C++Modern C++
Modern C++
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm
 
Core csharp and net quick reference
Core csharp and net quick referenceCore csharp and net quick reference
Core csharp and net quick reference
 
Python basics
Python basicsPython basics
Python basics
 
Introduction to Python Part-1
Introduction to Python Part-1Introduction to Python Part-1
Introduction to Python Part-1
 
Python ppt
Python pptPython ppt
Python ppt
 
Computer Science Assignment Help
 Computer Science Assignment Help  Computer Science Assignment Help
Computer Science Assignment Help
 
7.0 files and c input
7.0 files and c input7.0 files and c input
7.0 files and c input
 
Header files in c
Header files in cHeader files in c
Header files in c
 
python codes
python codespython codes
python codes
 
C language
C languageC language
C language
 
Python Scipy Numpy
Python Scipy NumpyPython Scipy Numpy
Python Scipy Numpy
 
basics of c++
basics of c++basics of c++
basics of c++
 
Big picture of category theory in scala with deep dive into contravariant and...
Big picture of category theory in scala with deep dive into contravariant and...Big picture of category theory in scala with deep dive into contravariant and...
Big picture of category theory in scala with deep dive into contravariant and...
 
Co&amp;al lecture-05
Co&amp;al lecture-05Co&amp;al lecture-05
Co&amp;al lecture-05
 
Chapter Eight(3)
Chapter Eight(3)Chapter Eight(3)
Chapter Eight(3)
 

Viewers also liked

Viewers also liked (11)

Type header file in c++ and its function
Type header file in c++ and its functionType header file in c++ and its function
Type header file in c++ and its function
 
Designing the application
Designing the applicationDesigning the application
Designing the application
 
C++ theory
C++ theoryC++ theory
C++ theory
 
Filelist
FilelistFilelist
Filelist
 
Headerfiles
HeaderfilesHeaderfiles
Headerfiles
 
Pre defined Functions in C
Pre defined Functions in CPre defined Functions in C
Pre defined Functions in C
 
8 header files
8 header files8 header files
8 header files
 
C functions
C functionsC functions
C functions
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Functions in C
Functions in CFunctions in C
Functions in C
 
C++ functions
C++ functionsC++ functions
C++ functions
 

Similar to Chapter 10 Library Function

Header files of c++ unit 3 -topic 3
Header files of c++ unit 3 -topic 3Header files of c++ unit 3 -topic 3
Header files of c++ unit 3 -topic 3MOHIT TOMAR
 
headerfilesinc-181121134545 (1).pdf
headerfilesinc-181121134545 (1).pdfheaderfilesinc-181121134545 (1).pdf
headerfilesinc-181121134545 (1).pdfjazzcashlimit
 
About the C Libraries which are essential
About the C Libraries which are essentialAbout the C Libraries which are essential
About the C Libraries which are essentialKakashiiHatake3
 
C++ functions presentation by DHEERAJ KATARIA
C++ functions presentation by DHEERAJ KATARIAC++ functions presentation by DHEERAJ KATARIA
C++ functions presentation by DHEERAJ KATARIADheeraj Kataria
 
Background Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdf
Background Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdfBackground Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdf
Background Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdfebrahimbadushata00
 
Introduction to C++, Standard Library, Class Template vector.pptx
Introduction to C++, Standard  Library, Class Template  vector.pptxIntroduction to C++, Standard  Library, Class Template  vector.pptx
Introduction to C++, Standard Library, Class Template vector.pptxemsResulzade1
 
Functions in C++
Functions in C++Functions in C++
Functions in C++home
 
Matlab Functions
Matlab FunctionsMatlab Functions
Matlab FunctionsUmer Azeem
 
0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdfssusere19c741
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programmingNimrita Koul
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming LanguageSteve Johnson
 

Similar to Chapter 10 Library Function (20)

Header files of c++ unit 3 -topic 3
Header files of c++ unit 3 -topic 3Header files of c++ unit 3 -topic 3
Header files of c++ unit 3 -topic 3
 
headerfilesinc-181121134545 (1).pdf
headerfilesinc-181121134545 (1).pdfheaderfilesinc-181121134545 (1).pdf
headerfilesinc-181121134545 (1).pdf
 
Chtp415
Chtp415Chtp415
Chtp415
 
Workshop1
Workshop1Workshop1
Workshop1
 
Fp201 unit2 1
Fp201 unit2 1Fp201 unit2 1
Fp201 unit2 1
 
R language introduction
R language introductionR language introduction
R language introduction
 
C++ Functions
C++ FunctionsC++ Functions
C++ Functions
 
About the C Libraries which are essential
About the C Libraries which are essentialAbout the C Libraries which are essential
About the C Libraries which are essential
 
Built in function
Built in functionBuilt in function
Built in function
 
C++ functions
C++ functionsC++ functions
C++ functions
 
C++ functions presentation by DHEERAJ KATARIA
C++ functions presentation by DHEERAJ KATARIAC++ functions presentation by DHEERAJ KATARIA
C++ functions presentation by DHEERAJ KATARIA
 
Cpp-c++.pptx
Cpp-c++.pptxCpp-c++.pptx
Cpp-c++.pptx
 
Background Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdf
Background Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdfBackground Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdf
Background Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdf
 
Introduction to C++, Standard Library, Class Template vector.pptx
Introduction to C++, Standard  Library, Class Template  vector.pptxIntroduction to C++, Standard  Library, Class Template  vector.pptx
Introduction to C++, Standard Library, Class Template vector.pptx
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Matlab Functions
Matlab FunctionsMatlab Functions
Matlab Functions
 
0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf0-Slot14-15-16-Libraries.pdf
0-Slot14-15-16-Libraries.pdf
 
R Get Started I
R Get Started IR Get Started I
R Get Started I
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
 

More from Deepak Singh

Computer networks - CBSE New Syllabus (083) Class - XII
Computer networks - CBSE  New Syllabus (083) Class - XIIComputer networks - CBSE  New Syllabus (083) Class - XII
Computer networks - CBSE New Syllabus (083) Class - XIIDeepak Singh
 
Chpater29 operation-on-file
Chpater29 operation-on-fileChpater29 operation-on-file
Chpater29 operation-on-fileDeepak Singh
 
Chapter28 data-file-handling
Chapter28 data-file-handlingChapter28 data-file-handling
Chapter28 data-file-handlingDeepak Singh
 
Chapter27 polymorphism-virtual-function-abstract-class
Chapter27 polymorphism-virtual-function-abstract-classChapter27 polymorphism-virtual-function-abstract-class
Chapter27 polymorphism-virtual-function-abstract-classDeepak Singh
 
Chapter26 inheritance-ii
Chapter26 inheritance-iiChapter26 inheritance-ii
Chapter26 inheritance-iiDeepak Singh
 
Chapter25 inheritance-i
Chapter25 inheritance-iChapter25 inheritance-i
Chapter25 inheritance-iDeepak Singh
 
Chapter24 operator-overloading
Chapter24 operator-overloadingChapter24 operator-overloading
Chapter24 operator-overloadingDeepak Singh
 
Chapter23 friend-function-friend-class
Chapter23 friend-function-friend-classChapter23 friend-function-friend-class
Chapter23 friend-function-friend-classDeepak Singh
 
Chapter22 static-class-member-example
Chapter22 static-class-member-exampleChapter22 static-class-member-example
Chapter22 static-class-member-exampleDeepak Singh
 
Chapter21 separate-header-and-implementation-files
Chapter21 separate-header-and-implementation-filesChapter21 separate-header-and-implementation-files
Chapter21 separate-header-and-implementation-filesDeepak Singh
 
Chapter20 class-example-program
Chapter20 class-example-programChapter20 class-example-program
Chapter20 class-example-programDeepak Singh
 
Chapter19 constructor-and-destructor
Chapter19 constructor-and-destructorChapter19 constructor-and-destructor
Chapter19 constructor-and-destructorDeepak Singh
 
Chapter18 class-and-objects
Chapter18 class-and-objectsChapter18 class-and-objects
Chapter18 class-and-objectsDeepak Singh
 
Chapter15 structure
Chapter15 structureChapter15 structure
Chapter15 structureDeepak Singh
 
Chapter13 two-dimensional-array
Chapter13 two-dimensional-arrayChapter13 two-dimensional-array
Chapter13 two-dimensional-arrayDeepak Singh
 
Chapter12 array-single-dimension
Chapter12 array-single-dimensionChapter12 array-single-dimension
Chapter12 array-single-dimensionDeepak Singh
 
Chapter 11 Function
Chapter 11 FunctionChapter 11 Function
Chapter 11 FunctionDeepak Singh
 
Chapter 9 - Loops in C++
Chapter 9 - Loops in C++Chapter 9 - Loops in C++
Chapter 9 - Loops in C++Deepak Singh
 

More from Deepak Singh (20)

Computer networks - CBSE New Syllabus (083) Class - XII
Computer networks - CBSE  New Syllabus (083) Class - XIIComputer networks - CBSE  New Syllabus (083) Class - XII
Computer networks - CBSE New Syllabus (083) Class - XII
 
Chpater29 operation-on-file
Chpater29 operation-on-fileChpater29 operation-on-file
Chpater29 operation-on-file
 
Chapter28 data-file-handling
Chapter28 data-file-handlingChapter28 data-file-handling
Chapter28 data-file-handling
 
Chapter27 polymorphism-virtual-function-abstract-class
Chapter27 polymorphism-virtual-function-abstract-classChapter27 polymorphism-virtual-function-abstract-class
Chapter27 polymorphism-virtual-function-abstract-class
 
Chapter26 inheritance-ii
Chapter26 inheritance-iiChapter26 inheritance-ii
Chapter26 inheritance-ii
 
Chapter25 inheritance-i
Chapter25 inheritance-iChapter25 inheritance-i
Chapter25 inheritance-i
 
Chapter24 operator-overloading
Chapter24 operator-overloadingChapter24 operator-overloading
Chapter24 operator-overloading
 
Chapter23 friend-function-friend-class
Chapter23 friend-function-friend-classChapter23 friend-function-friend-class
Chapter23 friend-function-friend-class
 
Chapter22 static-class-member-example
Chapter22 static-class-member-exampleChapter22 static-class-member-example
Chapter22 static-class-member-example
 
Chapter21 separate-header-and-implementation-files
Chapter21 separate-header-and-implementation-filesChapter21 separate-header-and-implementation-files
Chapter21 separate-header-and-implementation-files
 
Chapter20 class-example-program
Chapter20 class-example-programChapter20 class-example-program
Chapter20 class-example-program
 
Chapter19 constructor-and-destructor
Chapter19 constructor-and-destructorChapter19 constructor-and-destructor
Chapter19 constructor-and-destructor
 
Chapter18 class-and-objects
Chapter18 class-and-objectsChapter18 class-and-objects
Chapter18 class-and-objects
 
Chapter17 oop
Chapter17 oopChapter17 oop
Chapter17 oop
 
Chapter16 pointer
Chapter16 pointerChapter16 pointer
Chapter16 pointer
 
Chapter15 structure
Chapter15 structureChapter15 structure
Chapter15 structure
 
Chapter13 two-dimensional-array
Chapter13 two-dimensional-arrayChapter13 two-dimensional-array
Chapter13 two-dimensional-array
 
Chapter12 array-single-dimension
Chapter12 array-single-dimensionChapter12 array-single-dimension
Chapter12 array-single-dimension
 
Chapter 11 Function
Chapter 11 FunctionChapter 11 Function
Chapter 11 Function
 
Chapter 9 - Loops in C++
Chapter 9 - Loops in C++Chapter 9 - Loops in C++
Chapter 9 - Loops in C++
 

Recently uploaded

QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
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
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesSHIVANANDaRV
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 
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
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 

Recently uploaded (20)

QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
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
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
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
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 

Chapter 10 Library Function

  • 1. www.cppforschool.com C++ Standard Library Function The C++ Standard Library provides a rich collection of functions for performing common mathematical calculations, string manipulations, character manipulations, input/output, error checking and many other useful operations. This makes the programmer's job easier, because these functions provide many of the capabilities programmers need. The C++ Standard Library functions are provided as part of the C++ programming environment. Header file names ending in .h are "old-style" header files that have been superseded by the C++ Standard Library header files. C++ Standard Library header file Explanation <iostream> Contains function prototypes for the C++ standard input and standard output functions. This header file replaces header file <iostream.h>. <iomanip> Contains function prototypes for stream manipulators that format streams of data. This header file replaces header file <iomanip.h>. <cmath> Contains function prototypes for math library functions. This header file replaces header file <math.h>. <cstdlib> Contains function prototypes for conversions of numbers to text, text to numbers, memory allocation, random numbers and various other utility functions. This header file replaces header file <stdlib.h>.
  • 2. <ctime> Contains function prototypes and types for manipulating the time and date. This header file replaces header file <time.h>. <cctype> Contains function prototypes for functions that test characters for certain properties (such as whether the character is a digit or a punctuation), and function prototypes for functions that can be used to convert lowercase letters to uppercase letters and vice versa. This header file replaces header file <ctype.h> <cstring> Contains function prototypes for C-style string-processing functions. This header file replaces header file <string.h>. <cstdio> Contains function prototypes for the C-style standard input/output library functions and information used by them. This header file replaces header file <stdio.h>. <fstream> Contains function prototypes for functions that perform input from files on disk and output to files on disk. This header file replaces header file <fstream.h>. <climits> Contains the integral size limits of the system. This header file replaces header file <limits.h>. <cassert> Contains macros for adding diagnostics that aid program debugging. This replaces header file <assert.h> from pre-standard C++. <cfloat> Contains the floating-point size limits of the system. This header file replaces header file <float.h>. <string> Contains the definition of class string from the C++ Standard Library
  • 3. <vector>, <list>, <deque>, <queue>, <stack>, <map>, <set>, <bitset> These header files contain classes that implement the C++ Standard Library containers. Containers store data during a program's execution. <typeinfo> Contains classes for runtime type identification (determining data types at execution time). <exception>, <stdexcept> These header files contain classes that are used for exception handling. <memory> Contains classes and functions used by the C++ Standard Library to allocate memory to the C++ Standard Library containers. <sstream> Contains function prototypes for functions that perform input from strings in memory and output to strings in memory. <functional> Contains classes and functions used by C++ Standard Library algorithms. <iterator> Contains classes for accessing data in the C++ Standard Library containers. <algorithm> Contains functions for manipulating data in C++ Standard Library containers. <locale> Contains classes and functions normally used by stream processing to process data in the natural form for different languages (e.g., monetary formats, sorting strings, character
  • 4. presentation, etc.). <limits> Contains classes for defining the numerical data type limits on each computer platform. <utility> Contains classes and functions that are used by many C++ Standard Library header files. Mathematical Functions Some of the important mathematical functions in header file <cmath> are Function Meaning sin(x) Sine of an angle x (measured in radians) cos(x) Cosine of an angle x (measured in radians) tan(x) Tangent of an angle x (measured in radians) asin(x) Sin-1 (x) where x (measured in radians) acos(x) Cos-1 (x) where x (measured in radians) exp(x) Exponential function of x (ex) log(x) logarithm of x log 10(x) Logarithm of number x to the base 10 sqrt(x) Square root of x pow(x, y) x raised to the power y abs(x) Absolute value of integer number x fabs(x) Absolute value of real number x
  • 5. Character Functions All the character functions require <cctype> header file. The following table lists the function. Function Meaning isalpha(c) It returns True if C is an uppercase letter and False if c is lowercase. isdigit(c) It returns True if c is a digit (0 through 9) otherwise False. isalnum(c) It returns True if c is a digit from 0 through 9 or an alphabetic character (either uppercase or lowercase) otherwise False. islower(c) It returns True if C is a lowercase letter otherwise False. isupper(c) It returns True if C is an uppercase letter otherwise False. toupper(c) It converts c to uppercase letter. tolower(c) It converts c to lowercase letter.