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, 22.06.2019 07:00
For all machines-not just hammers- the user applies force force to the machine to the machine over a certain distance. a. input b. output c. duo d. none of the above
Answers: 1
question
Computers and Technology, 22.06.2019 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
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
Mathematics, 20.03.2020 06:31
question
Medicine, 20.03.2020 06:32
question
Mathematics, 20.03.2020 06:33
Questions on the website: 13722361