SlideShare una empresa de 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.

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Similar 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
 

Similar 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

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
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Último (20)

Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
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
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
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
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
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
 
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 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
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.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 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
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
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Ă...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 

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.