Computer Science, asked by shobhanshubaibil, 10 months ago

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 nashra1306
1

sorry I can't understand

Answered by harissaleem580
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