SlideShare une entreprise Scribd logo
1  sur  1
1. Library: It is a collection of files that your programs may use called header files. Header files
provide function prototypes, definitions of library functions, data types and constants.
2. Header files:
a. stdio.h: Defines types and macros for standard I/O package. Also defines I/O
predefined streams.
b. String.h: Declares several string manipulation and memory manipulation routines. All
functions starting with str and mem
c. Math.h: Declares prototypes for math functions and math error handlers. The routines
perform mathematical calculations and conversions.
d. Stdlib.h: Declares several commonly used routines like conversion routines,
search/sort routines and other miscellaneous things. Ex: free, labs, atof, atoi, atoll.
e. Iostream.h: Declares basic C++ streams I/O routines. Ex: open, close, get, write.
f. Iomanip.h: Declares C++ streams I/O manipulators and contains macros for creating
parameterised manipulators. Ex: dec, endl, ends, hex, oct.
3. Character functions:
a. Isalnum: Returns non zero if arg is letter or digit. Ex: if(isalnum(ch)) cout<<Alpha;
b. Isalpha: returns non zero if ch is an alphabet.
c. Isdigit: Returns non zero if ch is digit.
d. Islower: returns non zero if ch is a lowercase letter
e. Isupper: Returns non zero if ch is uppercase letter
f. Toupper: Returns uppercase equivalent of ch
g. Tolower: Returns lowercase equivalent of ch
4. String functions:
a. Strcat(str2, str1): Concatenates a copy of str2 to str1 and terminates str1 with a null.
b. Strcmp(str2,str1): Compares two strings and returns –ve value if str1<str2 and
positive value if str1>str2
c. Strcpy(str1,str2): Copies contents of str2 to str1
d. Strlen(str): Returns length of null terminated string. Null is not counted.
5. Math functions:
a. Fabs(x): returns absolute value of floating point number
b. Modf(x,y): returns the remainder of x/y.
6. Random and Randomize functions: Two macros of stdlib.h having similar functioning as
rand() and srand()
a. Random: Generates a random number within range 0 to number – 1.
b. Randomize: It initializes or seeds the random number generator with a random
number.

Contenu connexe

Tendances

Array
ArrayArray
Array
Hajar
 
02 Arrays And Memory Mapping
02 Arrays And Memory Mapping02 Arrays And Memory Mapping
02 Arrays And Memory Mapping
Qundeel
 
Scala collections wizardry - Scalapeño
Scala collections wizardry - ScalapeñoScala collections wizardry - Scalapeño
Scala collections wizardry - Scalapeño
Sagie Davidovich
 

Tendances (20)

Algorithms: I
Algorithms: IAlgorithms: I
Algorithms: I
 
Array, string and pointer
Array, string and pointerArray, string and pointer
Array, string and pointer
 
Array
ArrayArray
Array
 
Dynamic Programming Code-Optimization Algorithm (Compiler Design)
Dynamic Programming Code-Optimization Algorithm (Compiler Design)Dynamic Programming Code-Optimization Algorithm (Compiler Design)
Dynamic Programming Code-Optimization Algorithm (Compiler Design)
 
Priority Queue
Priority QueuePriority Queue
Priority Queue
 
Stack & Queue
Stack & QueueStack & Queue
Stack & Queue
 
Procedures And Functions in Matlab
Procedures And Functions in MatlabProcedures And Functions in Matlab
Procedures And Functions in Matlab
 
Data structure using c module 1
Data structure using c module 1Data structure using c module 1
Data structure using c module 1
 
2015.3.12 the root of lisp
2015.3.12 the root of lisp2015.3.12 the root of lisp
2015.3.12 the root of lisp
 
Array Of Pointers
Array Of PointersArray Of Pointers
Array Of Pointers
 
1.Array and linklst definition
1.Array and linklst definition1.Array and linklst definition
1.Array and linklst definition
 
02 Arrays And Memory Mapping
02 Arrays And Memory Mapping02 Arrays And Memory Mapping
02 Arrays And Memory Mapping
 
Algorithms: II
Algorithms: IIAlgorithms: II
Algorithms: II
 
STL in C++
STL in C++STL in C++
STL in C++
 
Associativity of operators
Associativity of operatorsAssociativity of operators
Associativity of operators
 
Scala collections wizardry - Scalapeño
Scala collections wizardry - ScalapeñoScala collections wizardry - Scalapeño
Scala collections wizardry - Scalapeño
 
Lecture 1 mte 407
Lecture 1 mte 407Lecture 1 mte 407
Lecture 1 mte 407
 
Lecture 1 mte 407
Lecture 1 mte 407Lecture 1 mte 407
Lecture 1 mte 407
 
Stl Containers
Stl ContainersStl Containers
Stl Containers
 
Day 5a iteration and functions if().pptx
Day 5a   iteration and functions  if().pptxDay 5a   iteration and functions  if().pptx
Day 5a iteration and functions if().pptx
 

Similaire à Functions class11 cbse_notes

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
Frankie Jones
 
CS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docx
CS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docxCS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docx
CS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docx
faithxdunce63732
 

Similaire à Functions class11 cbse_notes (20)

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
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard Way
 
0-Slot21-22-Strings.pdf
0-Slot21-22-Strings.pdf0-Slot21-22-Strings.pdf
0-Slot21-22-Strings.pdf
 
Strings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothiStrings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothi
 
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdfSTRINGS IN C MRS.SOWMYA JYOTHI.pdf
STRINGS IN C MRS.SOWMYA JYOTHI.pdf
 
Tut1
Tut1Tut1
Tut1
 
Lecture 2. mte 407
Lecture 2. mte 407Lecture 2. mte 407
Lecture 2. mte 407
 
CS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docx
CS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docxCS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docx
CS 360 LAB 3 STRINGS, FUNCTIONS, AND METHODSObjective The purpos.docx
 
characters_strings.pdf
characters_strings.pdfcharacters_strings.pdf
characters_strings.pdf
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)
 
Matlab: Procedures And Functions
Matlab: Procedures And FunctionsMatlab: Procedures And Functions
Matlab: Procedures And Functions
 
C string
C stringC string
C string
 
string in C
string in Cstring in C
string in C
 
C programming language
C programming languageC programming language
C programming language
 
Strings in c++
Strings in c++Strings in c++
Strings in c++
 
Python data handling
Python data handlingPython data handling
Python data handling
 
introduction to strings in c programming
introduction to strings in c programmingintroduction to strings in c programming
introduction to strings in c programming
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Strings
StringsStrings
Strings
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework Help
 

Dernier

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 

Dernier (20)

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
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
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 

Functions class11 cbse_notes

  • 1. 1. Library: It is a collection of files that your programs may use called header files. Header files provide function prototypes, definitions of library functions, data types and constants. 2. Header files: a. stdio.h: Defines types and macros for standard I/O package. Also defines I/O predefined streams. b. String.h: Declares several string manipulation and memory manipulation routines. All functions starting with str and mem c. Math.h: Declares prototypes for math functions and math error handlers. The routines perform mathematical calculations and conversions. d. Stdlib.h: Declares several commonly used routines like conversion routines, search/sort routines and other miscellaneous things. Ex: free, labs, atof, atoi, atoll. e. Iostream.h: Declares basic C++ streams I/O routines. Ex: open, close, get, write. f. Iomanip.h: Declares C++ streams I/O manipulators and contains macros for creating parameterised manipulators. Ex: dec, endl, ends, hex, oct. 3. Character functions: a. Isalnum: Returns non zero if arg is letter or digit. Ex: if(isalnum(ch)) cout<<Alpha; b. Isalpha: returns non zero if ch is an alphabet. c. Isdigit: Returns non zero if ch is digit. d. Islower: returns non zero if ch is a lowercase letter e. Isupper: Returns non zero if ch is uppercase letter f. Toupper: Returns uppercase equivalent of ch g. Tolower: Returns lowercase equivalent of ch 4. String functions: a. Strcat(str2, str1): Concatenates a copy of str2 to str1 and terminates str1 with a null. b. Strcmp(str2,str1): Compares two strings and returns –ve value if str1<str2 and positive value if str1>str2 c. Strcpy(str1,str2): Copies contents of str2 to str1 d. Strlen(str): Returns length of null terminated string. Null is not counted. 5. Math functions: a. Fabs(x): returns absolute value of floating point number b. Modf(x,y): returns the remainder of x/y. 6. Random and Randomize functions: Two macros of stdlib.h having similar functioning as rand() and srand() a. Random: Generates a random number within range 0 to number – 1. b. Randomize: It initializes or seeds the random number generator with a random number.