SlideShare una empresa de Scribd logo
1 de 5
Computer & Information Sciences
University of Delaware

C++ Header Files and Standard Functions
(This info is taken from Appendix C of the nice book Data Abstraction and Problem Solving
with C++, 3rd ed., by F. M. Carrano& J.J. Prichard.)

Here is a list of commonly used C++ headers. If an older version of the header
exists, its name is shown in parentheses.
cassert (assert.h)

This library contains only the function assert. You use
assert(assertion);

to test the validity of an assertion. If assertion is false, assertwrites an error
message and terminates program execution. You can disable all occurrences
of assert in your program by placing the directive
#define NDEBUG
before the include directive.
cctype (ctype.h)

Most functions in this library classify a given ASCII character as a letter, a digit,
and so on. Two other functions convert letters between uppercase and lowercase.
The classification functions return a true value if ch belongs to the specified group;
otherwise they return false.
isalnum(ch)

Returns true if ch is either a letter or a decimal digit
isalpha(ch) Returns true if ch is a letter
iscntrl(ch) Returns true if ch is a control character (ASCII 127 or 0 to 31)
isdigit(ch) Returns true if ch is a decimal digit
isgraph(ch) Returns true if ch is printable and nonblank
islower(ch) Returns true if ch is a lowercase letter
isprint(ch) Returns true if ch is printable (including blank)
ispunct(ch) Returns true if ch is a punctuation character
Returns true if ch is a whitespace character: space, tab, carriage return, new
isspace(ch)
line, or form feed
isupper(ch) Returns true if ch is an uppercase letter
isxdigit(ch) Returns true if ch is a hexidecimal digit
toascii(ch) Returns ASCII code for ch
Returns the lowercase version of ch if ch is an uppercase letter; otherwise
tolower(ch)
returns ch
Returns the uppercase version of ch if ch is a lowercase letter; otherwise
toupper(ch)
returns ch
cfloat (float.h)

Defines named constants that specify the range of floating-point values.
climits (limits.h)

Defines named constants that specify the range of integer values.
cmath (math.h)

The C++ functions in this library compute certain standard mathematical functions.
These functions are overloaded to accomodate float, double, and long double.
Unless otherwise indicated, each function has one argument, with the return type
being the same as the argument type (either float, double, orlong double).
acos

Returns the arc cosine
asin Returns the arc sine
atan Returns the arc tangent
atan2 Returns the arc tangent x/y for arguments x and y
ceil Rounds up
cos
Returns the cosine
cosh Returns the arc cosine
exp
Returns ex
fabs Returns the absolute value
floor Rounds down
fmod Returns x modulo y for arguments x and y
frexp For arguments x and eptr, where x = m * 2e, returns m and sets eptr to point to e
ldexp Returns x * 2e , for arguments x and e
log
Returns the natural log
log10 Returns the log base 10
For arguments x and iptr, returns the fractional part of x and sets iptr to point to the
modf
integer part of x
pow
Returns xy , for arguments x and y
sin
Returns the sine
sinh Returns the hyperbolic sine
sqrt Returns the square root
tan
Returns the tangent
tanh Returns the hyperbolic tangent
cstdlib (stdlib.h)
abort
abs
atof
atoi
exit
rand()

Terminates program execution abnormally
Returns the absolute value of an integer
Converts a string argument to floating point
Converts a string argument to an integer
Terminates program execution
Generates an unsigned int between 0 and RAND_MAX, a named constant
defined in cstdlib header file
srand(unsigned n) Seeds the rand() function so that it generates different
sequences of random numbers. srand is often used in conjunction
with the time function from the ctime library. For example,
srand(time(0));
cstring (string.h)

This library enables you to manipulate C strings that end in the char '0', the null
char. Unless noted otherwise, these functions return a pointer to the resulting string
in addition to modifying an appropriate argument. The argument ch is a character,
n is an integer, and the other arguments are strings, which usually means they are
names of a char array, but can be string constants in some cases. For example,
strcmp("Hello", "Goodbye");
strcat(toS, fromS)
Copies fromS to the end of toS
strncat(toS, fromS, n) Copies at most n characters of fromS to the end
oftoS and appends 0
strcmp(str1, str2)
Returns an integer that is negative if str1 < str2,
zero if str1 == str2, and positive if str1 > str2
stricmp(str1, str2)
Behaves like strcmp, but ignores case
strncmp(str1, str2, n) Behaves like strcmp, but compares the first
n characters of each string
strcpy(toS, fromS)
Copies fromStoS
strncpy(toS, fromS, n) Copies n characters of fromS to toS, truncating
or padding with 0 as necessary
strspn(str1, str2)
Returns the number of initial consecutive
characters
of str1 that are not in str2
strcspn(str1, str2)
Returns the number of initial consecutive
characters
of str1 that are in str2
strlen(str)
Returns the length of str, excluding 0
strlwr(str)
Converts any uppercase letters in str to lowercase
without altering other characters
strupr(str)
Converts any lowercase letters in str to uppercase
without altering other characters
strchr(str, ch)
Returns a pointer to the first occurrence of ch
instr; otherwise returns NULL
strrchr(str, ch)
Returns a pointer to the last occurrence of ch in
str; otherwise returns NULL
strpbrk(str1, str2)
Returns a pointer to the first character in str1
that also appears in str2; otherwise returns NULL
strstr(str1, str2)
Returns a pointer to the first occurrence of str2
in str1; otherwise returns NULL
strtok(str1, str2)
Finds the next token in str1 that is followed by
str2, returns a pointer to the token and writes
NULL immediately after the token in str1
ctime

Defines functions for manipulating time and dates.
exception

Defines classes, types, and functions that relate to exception handling. A portion of
the class exception is shown below.
class exception
{
public:
exception() throw();
virtual -exception() throw();
exception&operator=(const exception %exc) throw();
virtualconst char *what() const throw();
}
fstream (fstream.h)

Declares the C++ classes that support file I/O.
iomanip (iomanip.h)

The manipulation in this library affect the format of steam operations. Note that
iostream contains additional manipulators.
setbase(b)
setfill(f)
setprecision(n)
setw(n)

Setts number base to b = 8, 10, or 16
Sets fill character to f
Sets floating-point precision to integer n
Sets field width to integer n

iostream (iostream.h)

The manipulators in this library affect the format of stream operations. Note that
iomanip contains additional manipulators.
dec
end1
ends
flush
hex
representation
oct
representation
ws

Tells subsequent operation to use decimal representation
Inserts new-line character n and flushes output stream
Inserts null character 0 in an output stream
Flushes an output stream
Tells subsequent I/O operations to use hexadecimal
Tells subsequent I/O operation to use octal
Extracts whitespace characters on input stream

string

This library enables you to manipulate C++ strings. Described here is a selection of
the functions that this library provides. In addition, you can use the following
operators with C++ strings: =, +, ==, !=, <, <=, >, >=, <<, and >>. Note that
positions within a string begin at 0.
erase()
erase(pos, len)
and
containslen characters
find(subString)
string
length()

Makes the string empty
Removes the substring that begins at position pos
Returns the position of a substring within the

Returns the number of characters in the string
(same as size)
replace(pos, len, str)
Replaces the substring that begins at position
pos and contains len characters with the string str
size()
Returns the number of characters in ths string
(same as length)
substr(pos, len)
Returns the substring that begins at position pos
and contains len characters
Type header file in c++ and its function

Más contenido relacionado

La actualidad más candente

Constants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya JyothiConstants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya JyothiSowmyaJyothi3
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C ProgrammingKamal Acharya
 
Strings in c
Strings in cStrings in c
Strings in cvampugani
 
Python strings presentation
Python strings presentationPython strings presentation
Python strings presentationVedaGayathri1
 
C programming - String
C programming - StringC programming - String
C programming - StringAchyut Devkota
 
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C-Programming  C LIBRARIES AND USER DEFINED LIBRARIES.pptxC-Programming  C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptxSKUP1
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional arrayRajendran
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python ProgrammingKamal Acharya
 
Functions in c language
Functions in c language Functions in c language
Functions in c language tanmaymodi4
 
08. handling file streams
08. handling file streams08. handling file streams
08. handling file streamsHaresh Jaiswal
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorialMohit Saini
 

La actualidad más candente (20)

Constants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya JyothiConstants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya Jyothi
 
C++ string
C++ stringC++ string
C++ string
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C Programming
 
Strings in c
Strings in cStrings in c
Strings in c
 
C programming language
C programming languageC programming language
C programming language
 
Python strings presentation
Python strings presentationPython strings presentation
Python strings presentation
 
C programming - String
C programming - StringC programming - String
C programming - String
 
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C-Programming  C LIBRARIES AND USER DEFINED LIBRARIES.pptxC-Programming  C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptx
 
Data Types In C
Data Types In CData Types In C
Data Types In C
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional array
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
 
C++
C++C++
C++
 
Arrays in C language
Arrays in C languageArrays in C language
Arrays in C language
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
08. handling file streams
08. handling file streams08. handling file streams
08. handling file streams
 
C function
C functionC function
C function
 
Data type in c
Data type in cData type in c
Data type in c
 
String in c
String in cString in c
String in c
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorial
 
C++ programming (Array)
C++ programming (Array)C++ programming (Array)
C++ programming (Array)
 

Destacado

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
 
Chapter 10 Library Function
Chapter 10 Library FunctionChapter 10 Library Function
Chapter 10 Library FunctionDeepak Singh
 
C language sample test
C language sample testC language sample test
C language sample testSompal Duhan
 
Designing the application
Designing the applicationDesigning the application
Designing the applicationMilind Mishra
 
Consuming and Creating Libraries in C++
Consuming and Creating Libraries in C++Consuming and Creating Libraries in C++
Consuming and Creating Libraries in C++Richard Thomson
 
The buying brain
The buying brainThe buying brain
The buying brainsketchout
 
A COMPLETE FILE FOR C++
A COMPLETE FILE FOR C++A COMPLETE FILE FOR C++
A COMPLETE FILE FOR C++M Hussnain Ali
 
ITK Tutorial Presentation Slides-944
ITK Tutorial Presentation Slides-944ITK Tutorial Presentation Slides-944
ITK Tutorial Presentation Slides-944Kitware Kitware
 
Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)Abdullah khawar
 
File handling in C++
File handling in C++File handling in C++
File handling in C++Hitesh Kumar
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Aman Deep
 
Files in c++ ppt
Files in c++ pptFiles in c++ ppt
Files in c++ pptKumar
 

Destacado (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
 
8 header files
8 header files8 header files
8 header files
 
Chapter 10 Library Function
Chapter 10 Library FunctionChapter 10 Library Function
Chapter 10 Library Function
 
C language sample test
C language sample testC language sample test
C language sample test
 
Designing the application
Designing the applicationDesigning the application
Designing the application
 
C++ theory
C++ theoryC++ theory
C++ theory
 
C-Header file
C-Header fileC-Header file
C-Header file
 
Filelist
FilelistFilelist
Filelist
 
Headerfiles
HeaderfilesHeaderfiles
Headerfiles
 
Consuming and Creating Libraries in C++
Consuming and Creating Libraries in C++Consuming and Creating Libraries in C++
Consuming and Creating Libraries in C++
 
The buying brain
The buying brainThe buying brain
The buying brain
 
File in cpp 2016
File in cpp 2016 File in cpp 2016
File in cpp 2016
 
A COMPLETE FILE FOR C++
A COMPLETE FILE FOR C++A COMPLETE FILE FOR C++
A COMPLETE FILE FOR C++
 
ITK Tutorial Presentation Slides-944
ITK Tutorial Presentation Slides-944ITK Tutorial Presentation Slides-944
ITK Tutorial Presentation Slides-944
 
Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)
 
C++ file
C++ fileC++ file
C++ file
 
File handling in C++
File handling in C++File handling in C++
File handling in C++
 
Filehandlinging cp2
Filehandlinging cp2Filehandlinging cp2
Filehandlinging cp2
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
 
Files in c++ ppt
Files in c++ pptFiles in c++ ppt
Files in c++ ppt
 

Similar a Type header file in c++ and its function

ANSI C REFERENCE CARD
ANSI C REFERENCE CARDANSI C REFERENCE CARD
ANSI C REFERENCE CARDTia Ricci
 
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.pdfSowmyaJyothi3
 
Bsc cs i pic u-4 function, storage class and array and strings
Bsc cs i pic u-4 function, storage class and array and stringsBsc cs i pic u-4 function, storage class and array and strings
Bsc cs i pic u-4 function, storage class and array and stringsRai University
 
Btech i pic u-4 function, storage class and array and strings
Btech i pic u-4 function, storage class and array and stringsBtech i pic u-4 function, storage class and array and strings
Btech i pic u-4 function, storage class and array and stringsRai University
 
Functions torage class and array and strings-
Functions torage class and array and strings-Functions torage class and array and strings-
Functions torage class and array and strings-aneebkmct
 
Diploma ii cfpc u-4 function, storage class and array and strings
Diploma ii  cfpc u-4 function, storage class and array and stringsDiploma ii  cfpc u-4 function, storage class and array and strings
Diploma ii cfpc u-4 function, storage class and array and stringsRai University
 
function, storage class and array and strings
 function, storage class and array and strings function, storage class and array and strings
function, storage class and array and stringsRai University
 
Mcai pic u 4 function, storage class and array and strings
Mcai pic u 4 function, storage class and array and stringsMcai pic u 4 function, storage class and array and strings
Mcai pic u 4 function, storage class and array and stringsRai University
 
Strinng Classes in c++
Strinng Classes in c++Strinng Classes in c++
Strinng Classes in c++Vikash Dhal
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework HelpC++ Homework Help
 
Strings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothiStrings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothiSowmya Jyothi
 
COM1407: Type Casting, Command Line Arguments and Defining Constants
COM1407: Type Casting, Command Line Arguments and Defining Constants COM1407: Type Casting, Command Line Arguments and Defining Constants
COM1407: Type Casting, Command Line Arguments and Defining Constants Hemantha Kulathilake
 

Similar a Type header file in c++ and its function (20)

ANSI C REFERENCE CARD
ANSI C REFERENCE CARDANSI C REFERENCE CARD
ANSI C REFERENCE CARD
 
Strings
StringsStrings
Strings
 
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
 
Bsc cs i pic u-4 function, storage class and array and strings
Bsc cs i pic u-4 function, storage class and array and stringsBsc cs i pic u-4 function, storage class and array and strings
Bsc cs i pic u-4 function, storage class and array and strings
 
Functions class11 cbse_notes
Functions class11 cbse_notesFunctions class11 cbse_notes
Functions class11 cbse_notes
 
Btech i pic u-4 function, storage class and array and strings
Btech i pic u-4 function, storage class and array and stringsBtech i pic u-4 function, storage class and array and strings
Btech i pic u-4 function, storage class and array and strings
 
Functions torage class and array and strings-
Functions torage class and array and strings-Functions torage class and array and strings-
Functions torage class and array and strings-
 
Diploma ii cfpc u-4 function, storage class and array and strings
Diploma ii  cfpc u-4 function, storage class and array and stringsDiploma ii  cfpc u-4 function, storage class and array and strings
Diploma ii cfpc u-4 function, storage class and array and strings
 
function, storage class and array and strings
 function, storage class and array and strings function, storage class and array and strings
function, storage class and array and strings
 
Mcai pic u 4 function, storage class and array and strings
Mcai pic u 4 function, storage class and array and stringsMcai pic u 4 function, storage class and array and strings
Mcai pic u 4 function, storage class and array and strings
 
Unitii string
Unitii stringUnitii string
Unitii string
 
Strinng Classes in c++
Strinng Classes in c++Strinng Classes in c++
Strinng Classes in c++
 
14 ruby strings
14 ruby strings14 ruby strings
14 ruby strings
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework Help
 
C Programming Unit-3
C Programming Unit-3C Programming Unit-3
C Programming Unit-3
 
Lecture 2. mte 407
Lecture 2. mte 407Lecture 2. mte 407
Lecture 2. mte 407
 
Strings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothiStrings in c mrs.sowmya jyothi
Strings in c mrs.sowmya jyothi
 
C string
C stringC string
C string
 
Python data handling
Python data handlingPython data handling
Python data handling
 
COM1407: Type Casting, Command Line Arguments and Defining Constants
COM1407: Type Casting, Command Line Arguments and Defining Constants COM1407: Type Casting, Command Line Arguments and Defining Constants
COM1407: Type Casting, Command Line Arguments and Defining Constants
 

Más de Frankie Jones

Dbm2013 engineering mathematics 3 june 2017
Dbm2013  engineering mathematics 3 june 2017Dbm2013  engineering mathematics 3 june 2017
Dbm2013 engineering mathematics 3 june 2017Frankie Jones
 
Basic concepts of information technology and the internet
Basic concepts of information technology and the internetBasic concepts of information technology and the internet
Basic concepts of information technology and the internetFrankie Jones
 
2.1 Understand problem solving concept
2.1 Understand problem solving concept2.1 Understand problem solving concept
2.1 Understand problem solving conceptFrankie Jones
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problemFrankie Jones
 
2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life CycleFrankie Jones
 
Introduction to programming principles languages
Introduction to programming principles languagesIntroduction to programming principles languages
Introduction to programming principles languagesFrankie Jones
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGFrankie Jones
 
Chapter 3 Computer Organization
Chapter 3 Computer OrganizationChapter 3 Computer Organization
Chapter 3 Computer OrganizationFrankie Jones
 
Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Frankie Jones
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Frankie Jones
 
Chapter 1 computer hardware and flow of information
Chapter 1 computer hardware and flow of informationChapter 1 computer hardware and flow of information
Chapter 1 computer hardware and flow of informationFrankie Jones
 
Multimedia storyboard template
Multimedia storyboard templateMultimedia storyboard template
Multimedia storyboard templateFrankie Jones
 
Occupancy calculation form
Occupancy calculation formOccupancy calculation form
Occupancy calculation formFrankie Jones
 

Más de Frankie Jones (14)

Dbm2013 engineering mathematics 3 june 2017
Dbm2013  engineering mathematics 3 june 2017Dbm2013  engineering mathematics 3 june 2017
Dbm2013 engineering mathematics 3 june 2017
 
Basic concepts of information technology and the internet
Basic concepts of information technology and the internetBasic concepts of information technology and the internet
Basic concepts of information technology and the internet
 
2.1 Understand problem solving concept
2.1 Understand problem solving concept2.1 Understand problem solving concept
2.1 Understand problem solving concept
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem
 
2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle
 
Introduction to programming principles languages
Introduction to programming principles languagesIntroduction to programming principles languages
Introduction to programming principles languages
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
Chapter 3 Computer Organization
Chapter 3 Computer OrganizationChapter 3 Computer Organization
Chapter 3 Computer Organization
 
Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)
 
Chapter 1 computer hardware and flow of information
Chapter 1 computer hardware and flow of informationChapter 1 computer hardware and flow of information
Chapter 1 computer hardware and flow of information
 
Operator precedence
Operator precedenceOperator precedence
Operator precedence
 
Multimedia storyboard template
Multimedia storyboard templateMultimedia storyboard template
Multimedia storyboard template
 
Occupancy calculation form
Occupancy calculation formOccupancy calculation form
Occupancy calculation form
 

Último

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
 
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
 
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.pptxMaritesTamaniVerdade
 
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.christianmathematics
 
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
 
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...Poonam Aher Patil
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
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 ClassesCeline George
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
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.pdfNirmal Dwivedi
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
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 Delhikauryashika82
 
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.pptxnegromaestrong
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
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.pptxDenish Jangid
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
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
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Último (20)

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
 
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
 
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
 
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.
 
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
 
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...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
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
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
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
 
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
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
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
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
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
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Type header file in c++ and its function

  • 1. Computer & Information Sciences University of Delaware C++ Header Files and Standard Functions (This info is taken from Appendix C of the nice book Data Abstraction and Problem Solving with C++, 3rd ed., by F. M. Carrano& J.J. Prichard.) Here is a list of commonly used C++ headers. If an older version of the header exists, its name is shown in parentheses. cassert (assert.h) This library contains only the function assert. You use assert(assertion); to test the validity of an assertion. If assertion is false, assertwrites an error message and terminates program execution. You can disable all occurrences of assert in your program by placing the directive #define NDEBUG before the include directive. cctype (ctype.h) Most functions in this library classify a given ASCII character as a letter, a digit, and so on. Two other functions convert letters between uppercase and lowercase. The classification functions return a true value if ch belongs to the specified group; otherwise they return false. isalnum(ch) Returns true if ch is either a letter or a decimal digit isalpha(ch) Returns true if ch is a letter iscntrl(ch) Returns true if ch is a control character (ASCII 127 or 0 to 31) isdigit(ch) Returns true if ch is a decimal digit isgraph(ch) Returns true if ch is printable and nonblank islower(ch) Returns true if ch is a lowercase letter isprint(ch) Returns true if ch is printable (including blank) ispunct(ch) Returns true if ch is a punctuation character Returns true if ch is a whitespace character: space, tab, carriage return, new isspace(ch) line, or form feed isupper(ch) Returns true if ch is an uppercase letter isxdigit(ch) Returns true if ch is a hexidecimal digit toascii(ch) Returns ASCII code for ch Returns the lowercase version of ch if ch is an uppercase letter; otherwise tolower(ch) returns ch Returns the uppercase version of ch if ch is a lowercase letter; otherwise toupper(ch) returns ch
  • 2. cfloat (float.h) Defines named constants that specify the range of floating-point values. climits (limits.h) Defines named constants that specify the range of integer values. cmath (math.h) The C++ functions in this library compute certain standard mathematical functions. These functions are overloaded to accomodate float, double, and long double. Unless otherwise indicated, each function has one argument, with the return type being the same as the argument type (either float, double, orlong double). acos Returns the arc cosine asin Returns the arc sine atan Returns the arc tangent atan2 Returns the arc tangent x/y for arguments x and y ceil Rounds up cos Returns the cosine cosh Returns the arc cosine exp Returns ex fabs Returns the absolute value floor Rounds down fmod Returns x modulo y for arguments x and y frexp For arguments x and eptr, where x = m * 2e, returns m and sets eptr to point to e ldexp Returns x * 2e , for arguments x and e log Returns the natural log log10 Returns the log base 10 For arguments x and iptr, returns the fractional part of x and sets iptr to point to the modf integer part of x pow Returns xy , for arguments x and y sin Returns the sine sinh Returns the hyperbolic sine sqrt Returns the square root tan Returns the tangent tanh Returns the hyperbolic tangent cstdlib (stdlib.h) abort abs atof atoi exit rand() Terminates program execution abnormally Returns the absolute value of an integer Converts a string argument to floating point Converts a string argument to an integer Terminates program execution Generates an unsigned int between 0 and RAND_MAX, a named constant
  • 3. defined in cstdlib header file srand(unsigned n) Seeds the rand() function so that it generates different sequences of random numbers. srand is often used in conjunction with the time function from the ctime library. For example, srand(time(0)); cstring (string.h) This library enables you to manipulate C strings that end in the char '0', the null char. Unless noted otherwise, these functions return a pointer to the resulting string in addition to modifying an appropriate argument. The argument ch is a character, n is an integer, and the other arguments are strings, which usually means they are names of a char array, but can be string constants in some cases. For example, strcmp("Hello", "Goodbye"); strcat(toS, fromS) Copies fromS to the end of toS strncat(toS, fromS, n) Copies at most n characters of fromS to the end oftoS and appends 0 strcmp(str1, str2) Returns an integer that is negative if str1 < str2, zero if str1 == str2, and positive if str1 > str2 stricmp(str1, str2) Behaves like strcmp, but ignores case strncmp(str1, str2, n) Behaves like strcmp, but compares the first n characters of each string strcpy(toS, fromS) Copies fromStoS strncpy(toS, fromS, n) Copies n characters of fromS to toS, truncating or padding with 0 as necessary strspn(str1, str2) Returns the number of initial consecutive characters of str1 that are not in str2 strcspn(str1, str2) Returns the number of initial consecutive characters of str1 that are in str2 strlen(str) Returns the length of str, excluding 0 strlwr(str) Converts any uppercase letters in str to lowercase without altering other characters strupr(str) Converts any lowercase letters in str to uppercase without altering other characters strchr(str, ch) Returns a pointer to the first occurrence of ch instr; otherwise returns NULL strrchr(str, ch) Returns a pointer to the last occurrence of ch in str; otherwise returns NULL strpbrk(str1, str2) Returns a pointer to the first character in str1 that also appears in str2; otherwise returns NULL strstr(str1, str2) Returns a pointer to the first occurrence of str2 in str1; otherwise returns NULL strtok(str1, str2) Finds the next token in str1 that is followed by str2, returns a pointer to the token and writes NULL immediately after the token in str1 ctime Defines functions for manipulating time and dates. exception Defines classes, types, and functions that relate to exception handling. A portion of the class exception is shown below.
  • 4. class exception { public: exception() throw(); virtual -exception() throw(); exception&operator=(const exception %exc) throw(); virtualconst char *what() const throw(); } fstream (fstream.h) Declares the C++ classes that support file I/O. iomanip (iomanip.h) The manipulation in this library affect the format of steam operations. Note that iostream contains additional manipulators. setbase(b) setfill(f) setprecision(n) setw(n) Setts number base to b = 8, 10, or 16 Sets fill character to f Sets floating-point precision to integer n Sets field width to integer n iostream (iostream.h) The manipulators in this library affect the format of stream operations. Note that iomanip contains additional manipulators. dec end1 ends flush hex representation oct representation ws Tells subsequent operation to use decimal representation Inserts new-line character n and flushes output stream Inserts null character 0 in an output stream Flushes an output stream Tells subsequent I/O operations to use hexadecimal Tells subsequent I/O operation to use octal Extracts whitespace characters on input stream string This library enables you to manipulate C++ strings. Described here is a selection of the functions that this library provides. In addition, you can use the following operators with C++ strings: =, +, ==, !=, <, <=, >, >=, <<, and >>. Note that positions within a string begin at 0. erase() erase(pos, len) and containslen characters find(subString) string length() Makes the string empty Removes the substring that begins at position pos Returns the position of a substring within the Returns the number of characters in the string (same as size) replace(pos, len, str) Replaces the substring that begins at position pos and contains len characters with the string str size() Returns the number of characters in ths string (same as length) substr(pos, len) Returns the substring that begins at position pos and contains len characters