SlideShare a Scribd company logo
Presented By:
Mayank Seth
Arun Brijwasi
File streams in C++.
Fstream library
Assert library
Math library
Ctype library
CONTENTS
C++ uses the file stream as an interface
between the programs and the data files.
FILE STREAMS IN C++
In C++ we use IOSTREAM library which
provides cin and cout object for taking input
and output from console.
To read and write from a file we use the
standard C++ library called FSTREAM.
It defines three more data types :
Ofstream
Ifstream
fstream
FSTREAM LIBRARY
This data type represents the output file
stream and is used to create files and to write
information to files.
Either ofstream or fstream object may be
used to open a file for writing.
Example: For opening a file for writing data
into it we use the object of ofstream class:
ofstream outfile;
outfile.open(“myfile.txt");
OFSTREAM
This data type represents the input file stream
and is used to read information from files.
And ifstream object is used to open a file for
reading purpose only along with the open
function.
Example: For opening a file for writing data
into it we use the object of ifstream class:
ifstream infile;
infile.open(“myfile.txt");
IFSTREAM
This data type represents the file stream
generally, and has the capabilities of both
ofstream and ifstream which means it can
create files, write information to files, and
read information from files.
The fstream object can be used for with the
open function for both reading from and
writing to file.
FSTREAM
Assertions are statements used to test
assumptions made by programmer.
The assert library provides a
preprocessor macro assert that is useful
during program development.
ASSERT LIBRARY
When an assert macro is invoked its
parameter expression is checked to see
whether its value is zero or not
If value is non-zero program continues
normally.
If value is zero the program produces an error
message .
Following is the syntax for assertion:
assert(expression);
The assert library is a c based library thus
when including this library we use cassert.
ASSERT LIBRARY
C++ being superset of C, supports large
number of useful mathematical functions.
In order to use these functions you need to
include header file- <math.h> or <cmath>.
MATH LIBRARY
VARIOUS FUNCTIONS OF MATH LIBRARY
Function name Meaning
double sin(double) : This function takes angle (in degree) as an
argument and return its sine value
double cos(double) : This function takes angle (in degree) as an
argument and return its cosine value
double tan(double) This function takes angle (in degree) as an
argument and return its tangent value.
double sqrt(double) : This function takes number as an
argument and return its square root value.
int abs(int) This function takes integer number as an
argument and return its absolute value.
Function name meaning
double pow(double, double) : This function takes one argument as base
and other as exponent.
double hypot(double, double) : This function requires two sides of the
right angled triangle to give output as its
hypotenuse
double floor(double) : This functions returns the integer value
lesser or equal to argument passed in the
function.
double fabs(double) : This function returns the absolute value of
any number.
double acos(double) : This function returns the arc cosine of
argument.
double asin(double) : This function returns the arc sine of
argument.
double atan(double) : This function returns the arc tangent of
argument.
double ceil(double) : This function returns the smallest integer
as double not less than the argument
provided.
Function name Meaning
double cosh(double) : This function returns the hyperbolic
cosine of argument provided.
double tanh(double) : This function returns the hyperbolic
tangent of argument provided.
double log(double) : This function takes a number and returns
the natural log of that number.
Contains function prototypes for functions that
test characters for certain properties.
Since it is a C based library we write
<cctype.h> to include it in our c++ progam.
CTYPE LIBRARY
Function Name Meaning
int isalnum(int c) Checks whether the passed character is
alphanumeric.
int isalpha(int c) Checks whether the passed character is
alphabetic.
int iscntrl(int c) Checks whether the passed character is
control character.
int isdigit(int c) Checks whether the passed character is
decimal digit.
int isgraph(int c) Checks whether the passed character
has graphical representation using
locale.
int islower(int c) Checks whether the passed character is
lowercase letter.
int isprint(int c) Checks whether the passed character is
printable
VARIOUS FUNCTIONS OF <CTYPE>
HEADER FILE
Function Name Meaning
int ispunct(int c) Checks whether the passed character is a
punctuation character.
int isspace(int c) Checks whether the passed character is
white-space.
int isupper(int c) Checks whether the passed character is
an uppercase letter.
int isxdigit(int c) Checks whether the passed character is a
hexadecimal digit.
int tolower(int c) Converts uppercase letters to lowercase.
int toupper(int c) Converts lowercase letters to uppercase.
FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.

More Related Content

What's hot

C# Cheat Sheet
C# Cheat SheetC# Cheat Sheet
C# Cheat Sheet
GlowTouch
 
Array, string and pointer
Array, string and pointerArray, string and pointer
Array, string and pointer
Nishant Munjal
 
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
MOHIT TOMAR
 
Functions class11 cbse_notes
Functions class11 cbse_notesFunctions class11 cbse_notes
Functions class11 cbse_notes
Krishnaprasad Arumugam
 
Introduction to Python Part-1
Introduction to Python Part-1Introduction to Python Part-1
Introduction to Python Part-1
Devashish Kumar
 
150970116028 2140705
150970116028 2140705150970116028 2140705
150970116028 2140705
Manoj Shahu
 
NUMPY
NUMPY NUMPY
Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
Alexandru Bolboaca
 
Pointers in c v5 12102017 1
Pointers in c v5 12102017 1Pointers in c v5 12102017 1
Pointers in c v5 12102017 1
tanmaymodi4
 
Strings Functions in C Programming
Strings Functions in C ProgrammingStrings Functions in C Programming
Strings Functions in C Programming
DevoAjit Gupta
 
Python - Lecture 12
Python - Lecture 12Python - Lecture 12
Python - Lecture 12
Ravi Kiran Khareedi
 
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
 
Python advanced 3.the python std lib by example – application building blocks
Python advanced 3.the python std lib by example – application building blocksPython advanced 3.the python std lib by example – application building blocks
Python advanced 3.the python std lib by example – application building blocksJohn(Qiang) Zhang
 
Computer Science Assignment Help
 Computer Science Assignment Help  Computer Science Assignment Help
Computer Science Assignment Help
Programming Homework Help
 
Python- Regular expression
Python- Regular expressionPython- Regular expression
Python- Regular expression
Megha V
 
Functional ruby
Functional rubyFunctional ruby
Functional ruby
Kerry Buckley
 
Manipulators
ManipulatorsManipulators
Manipulators
VaishnaviVaishnavi17
 
Java Arrays and DateTime Functions
Java Arrays and DateTime FunctionsJava Arrays and DateTime Functions
Java Arrays and DateTime Functions
Jamsher bhanbhro
 
Iostream in c++
Iostream in c++Iostream in c++
Iostream in c++
غزالة
 
OODP UNIT 2 Function overloading
OODP UNIT 2 Function overloadingOODP UNIT 2 Function overloading
OODP UNIT 2 Function overloading
Shanmuganathan C
 

What's hot (20)

C# Cheat Sheet
C# Cheat SheetC# Cheat Sheet
C# Cheat Sheet
 
Array, string and pointer
Array, string and pointerArray, string and pointer
Array, string and pointer
 
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
 
Functions class11 cbse_notes
Functions class11 cbse_notesFunctions class11 cbse_notes
Functions class11 cbse_notes
 
Introduction to Python Part-1
Introduction to Python Part-1Introduction to Python Part-1
Introduction to Python Part-1
 
150970116028 2140705
150970116028 2140705150970116028 2140705
150970116028 2140705
 
NUMPY
NUMPY NUMPY
NUMPY
 
Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
 
Pointers in c v5 12102017 1
Pointers in c v5 12102017 1Pointers in c v5 12102017 1
Pointers in c v5 12102017 1
 
Strings Functions in C Programming
Strings Functions in C ProgrammingStrings Functions in C Programming
Strings Functions in C Programming
 
Python - Lecture 12
Python - Lecture 12Python - Lecture 12
Python - Lecture 12
 
Consuming and Creating Libraries in C++
Consuming and Creating Libraries in C++Consuming and Creating Libraries in C++
Consuming and Creating Libraries in C++
 
Python advanced 3.the python std lib by example – application building blocks
Python advanced 3.the python std lib by example – application building blocksPython advanced 3.the python std lib by example – application building blocks
Python advanced 3.the python std lib by example – application building blocks
 
Computer Science Assignment Help
 Computer Science Assignment Help  Computer Science Assignment Help
Computer Science Assignment Help
 
Python- Regular expression
Python- Regular expressionPython- Regular expression
Python- Regular expression
 
Functional ruby
Functional rubyFunctional ruby
Functional ruby
 
Manipulators
ManipulatorsManipulators
Manipulators
 
Java Arrays and DateTime Functions
Java Arrays and DateTime FunctionsJava Arrays and DateTime Functions
Java Arrays and DateTime Functions
 
Iostream in c++
Iostream in c++Iostream in c++
Iostream in c++
 
OODP UNIT 2 Function overloading
OODP UNIT 2 Function overloadingOODP UNIT 2 Function overloading
OODP UNIT 2 Function overloading
 

Similar to FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.

Functions in c++
Functions in c++Functions in c++
Functions in c++
Srikanth Mylapalli
 
Programming in C sesion 2
Programming in C sesion 2Programming in C sesion 2
Programming in C sesion 2
Prerna Sharma
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
home
 
Matlab Functions
Matlab FunctionsMatlab Functions
Matlab Functions
Umer Azeem
 
Chap 5 c++
Chap 5 c++Chap 5 c++
Lecture 4
Lecture 4Lecture 4
Lecture 4
Mohammed Saleh
 
Fundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programmingFundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programming
LidetAdmassu
 
Chap 5 c++
Chap 5 c++Chap 5 c++
C++ language
C++ languageC++ language
C++ language
Hamza Asif
 
Python Programming Basics for begginners
Python Programming Basics for begginnersPython Programming Basics for begginners
Python Programming Basics for begginners
Abishek Purushothaman
 
Python-02| Input, Output & Import
Python-02| Input, Output & ImportPython-02| Input, Output & Import
Python-02| Input, Output & Import
Mohd Sajjad
 
functionsinc-130108032745-phpapp01.pdf
functionsinc-130108032745-phpapp01.pdffunctionsinc-130108032745-phpapp01.pdf
functionsinc-130108032745-phpapp01.pdf
mounikanarra3
 
Functions and pointers_unit_4
Functions and pointers_unit_4Functions and pointers_unit_4
Functions and pointers_unit_4
Saranya saran
 
Programming in C (part 2)
Programming in C (part 2)Programming in C (part 2)
Programming in C (part 2)
SURBHI SAROHA
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
faithxdunce63732
 
C standard library functions
C standard library functionsC standard library functions
C standard library functions
Vaishnavee Sharma
 
Python Basics
Python BasicsPython Basics
Python Basics
tusharpanda88
 
12 computer science_notes_ch01_overview_of_cpp
12 computer science_notes_ch01_overview_of_cpp12 computer science_notes_ch01_overview_of_cpp
12 computer science_notes_ch01_overview_of_cpp
sharvivek
 
C function
C functionC function
C function
thirumalaikumar3
 

Similar to FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY. (20)

Functions in c++
Functions in c++Functions in c++
Functions in c++
 
Programming in C sesion 2
Programming in C sesion 2Programming in C sesion 2
Programming in C sesion 2
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Matlab Functions
Matlab FunctionsMatlab Functions
Matlab Functions
 
Ds lab handouts
Ds lab handoutsDs lab handouts
Ds lab handouts
 
Chap 5 c++
Chap 5 c++Chap 5 c++
Chap 5 c++
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Fundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programmingFundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programming
 
Chap 5 c++
Chap 5 c++Chap 5 c++
Chap 5 c++
 
C++ language
C++ languageC++ language
C++ language
 
Python Programming Basics for begginners
Python Programming Basics for begginnersPython Programming Basics for begginners
Python Programming Basics for begginners
 
Python-02| Input, Output & Import
Python-02| Input, Output & ImportPython-02| Input, Output & Import
Python-02| Input, Output & Import
 
functionsinc-130108032745-phpapp01.pdf
functionsinc-130108032745-phpapp01.pdffunctionsinc-130108032745-phpapp01.pdf
functionsinc-130108032745-phpapp01.pdf
 
Functions and pointers_unit_4
Functions and pointers_unit_4Functions and pointers_unit_4
Functions and pointers_unit_4
 
Programming in C (part 2)
Programming in C (part 2)Programming in C (part 2)
Programming in C (part 2)
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
 
C standard library functions
C standard library functionsC standard library functions
C standard library functions
 
Python Basics
Python BasicsPython Basics
Python Basics
 
12 computer science_notes_ch01_overview_of_cpp
12 computer science_notes_ch01_overview_of_cpp12 computer science_notes_ch01_overview_of_cpp
12 computer science_notes_ch01_overview_of_cpp
 
C function
C functionC function
C function
 

More from Meghaj Mallick

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
Meghaj Mallick
 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSS
Meghaj Mallick
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
Meghaj Mallick
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
Meghaj Mallick
 
MACRO ASSEBLER
MACRO ASSEBLERMACRO ASSEBLER
MACRO ASSEBLER
Meghaj Mallick
 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & Multimedia
Meghaj Mallick
 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPC
Meghaj Mallick
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
Meghaj Mallick
 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANET
Meghaj Mallick
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
Meghaj Mallick
 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPT
Meghaj Mallick
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
Meghaj Mallick
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
Meghaj Mallick
 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer Algorithm
Meghaj Mallick
 
Software Development Method
Software Development MethodSoftware Development Method
Software Development Method
Meghaj Mallick
 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical Method
Meghaj Mallick
 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in Organization
Meghaj Mallick
 
Communication Skill
Communication SkillCommunication Skill
Communication Skill
Meghaj Mallick
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
Meghaj Mallick
 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure
Meghaj Mallick
 

More from Meghaj Mallick (20)

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSS
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
 
MACRO ASSEBLER
MACRO ASSEBLERMACRO ASSEBLER
MACRO ASSEBLER
 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & Multimedia
 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPC
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANET
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPT
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer Algorithm
 
Software Development Method
Software Development MethodSoftware Development Method
Software Development Method
 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical Method
 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in Organization
 
Communication Skill
Communication SkillCommunication Skill
Communication Skill
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure
 

Recently uploaded

Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
Access Innovations, Inc.
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
OECD Directorate for Financial and Enterprise Affairs
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
IP ServerOne
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
Vladimir Samoylov
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
eCommerce Institute
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
OWASP Beja
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Orkestra
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Matjaž Lipuš
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 

Recently uploaded (16)

Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 

FSTREAM,ASSERT LIBRARY & CTYPE LIBRARY.

  • 2. File streams in C++. Fstream library Assert library Math library Ctype library CONTENTS
  • 3. C++ uses the file stream as an interface between the programs and the data files. FILE STREAMS IN C++
  • 4.
  • 5. In C++ we use IOSTREAM library which provides cin and cout object for taking input and output from console. To read and write from a file we use the standard C++ library called FSTREAM. It defines three more data types : Ofstream Ifstream fstream FSTREAM LIBRARY
  • 6. This data type represents the output file stream and is used to create files and to write information to files. Either ofstream or fstream object may be used to open a file for writing. Example: For opening a file for writing data into it we use the object of ofstream class: ofstream outfile; outfile.open(“myfile.txt"); OFSTREAM
  • 7. This data type represents the input file stream and is used to read information from files. And ifstream object is used to open a file for reading purpose only along with the open function. Example: For opening a file for writing data into it we use the object of ifstream class: ifstream infile; infile.open(“myfile.txt"); IFSTREAM
  • 8. This data type represents the file stream generally, and has the capabilities of both ofstream and ifstream which means it can create files, write information to files, and read information from files. The fstream object can be used for with the open function for both reading from and writing to file. FSTREAM
  • 9. Assertions are statements used to test assumptions made by programmer. The assert library provides a preprocessor macro assert that is useful during program development. ASSERT LIBRARY
  • 10. When an assert macro is invoked its parameter expression is checked to see whether its value is zero or not If value is non-zero program continues normally. If value is zero the program produces an error message . Following is the syntax for assertion: assert(expression); The assert library is a c based library thus when including this library we use cassert. ASSERT LIBRARY
  • 11. C++ being superset of C, supports large number of useful mathematical functions. In order to use these functions you need to include header file- <math.h> or <cmath>. MATH LIBRARY
  • 12. VARIOUS FUNCTIONS OF MATH LIBRARY Function name Meaning double sin(double) : This function takes angle (in degree) as an argument and return its sine value double cos(double) : This function takes angle (in degree) as an argument and return its cosine value double tan(double) This function takes angle (in degree) as an argument and return its tangent value. double sqrt(double) : This function takes number as an argument and return its square root value. int abs(int) This function takes integer number as an argument and return its absolute value.
  • 13. Function name meaning double pow(double, double) : This function takes one argument as base and other as exponent. double hypot(double, double) : This function requires two sides of the right angled triangle to give output as its hypotenuse double floor(double) : This functions returns the integer value lesser or equal to argument passed in the function. double fabs(double) : This function returns the absolute value of any number. double acos(double) : This function returns the arc cosine of argument. double asin(double) : This function returns the arc sine of argument. double atan(double) : This function returns the arc tangent of argument. double ceil(double) : This function returns the smallest integer as double not less than the argument provided.
  • 14. Function name Meaning double cosh(double) : This function returns the hyperbolic cosine of argument provided. double tanh(double) : This function returns the hyperbolic tangent of argument provided. double log(double) : This function takes a number and returns the natural log of that number.
  • 15. Contains function prototypes for functions that test characters for certain properties. Since it is a C based library we write <cctype.h> to include it in our c++ progam. CTYPE LIBRARY
  • 16. Function Name Meaning int isalnum(int c) Checks whether the passed character is alphanumeric. int isalpha(int c) Checks whether the passed character is alphabetic. int iscntrl(int c) Checks whether the passed character is control character. int isdigit(int c) Checks whether the passed character is decimal digit. int isgraph(int c) Checks whether the passed character has graphical representation using locale. int islower(int c) Checks whether the passed character is lowercase letter. int isprint(int c) Checks whether the passed character is printable VARIOUS FUNCTIONS OF <CTYPE> HEADER FILE
  • 17. Function Name Meaning int ispunct(int c) Checks whether the passed character is a punctuation character. int isspace(int c) Checks whether the passed character is white-space. int isupper(int c) Checks whether the passed character is an uppercase letter. int isxdigit(int c) Checks whether the passed character is a hexadecimal digit. int tolower(int c) Converts uppercase letters to lowercase. int toupper(int c) Converts lowercase letters to uppercase.