subject

Write a function that reads a text file, which has been opened in main program, and RETURNS the number of alphabetic characters (isalpha), digits (isdigit), punctuation characters (ispunct), and whitespace characters (isspace) in the file.
Here isalpha, isdigit, inpunct and isspace are C++ standard library functions, which are included in header file. More details about these functions are provided in Chapter 10.
Demonstrate the function in a complete program.
Hint
Use get function to read data from the file. For example, if fsIn is an opened input stream, then the following statement reads a character to the variable aChar from the opened file:
fsIn. get(aChar);
To read all data from a file, use while loop as follows:
while (fsIn. get(aChar)) // this is similar to while (fsin >> aChar)
{
……
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Experimental data that is expressed using numbers is said to be
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
question
Computers and Technology, 24.06.2019 08:30
Intellectual property rights are exclusive rights that protect both the created and the creation. ipr offers exclusively what benefits to the person or people covered by it
Answers: 3
You know the right answer?
Write a function that reads a text file, which has been opened in main program, and RETURNS the numb...
Questions
question
Geography, 06.07.2019 23:00
question
Mathematics, 06.07.2019 23:00
question
Mathematics, 06.07.2019 23:00
question
Mathematics, 06.07.2019 23:00