Write a user-defined function in C++ to read the content from a text file OUT.TXT,
count and display the number of alphabets present in it.
Answers
Answered by
1
sorry I can't understand
Answered by
0
Answer:
Explanation:
void alphabets()
{
ifstream fin;
fin.open("out.txt");
char ch;
int count=0;
while(!fin.eof())
{
fin.get(ch);
if(isalpha(ch))
count++;
}
cout<<"Number of alphabets in file are "<<count;
fin.close();
}
Similar questions