SlideShare uma empresa Scribd logo
1 de 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.

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
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
AnaAcapella
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
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
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
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
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
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...
 

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.