Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
1)Use file management in C programming.
2)The first is the source file and the second
is called the stop-words file.
3)You should remove all words listed in the stop-words file from the
source-file.

What I have tried:

DIDNT GET THE QUESTION.PLEASE HELP ME THROUGH IT
Posted
Updated 3-Mar-21 23:03pm

1 solution

It is simple to get, actually.
The only obscure point is 'file' as 'function argument'. That could mean either 'file pointer' or 'file name'. Assuming is the latter you have to produce something like
C
int remove_stop_words( const char * source_filename, const char * stop_words_filename)
{
// implementation here
}



such a function must:
  • Open both files.
  • Read the files content into memory.
  • Working in memory, remove from the 'source' content all the words listed in the 'stop words' content.
  • Write back (modified) 'source' memory content to the source_filename file.


In order to perform such a task you have to be a little comfortable with C file I/O. There are many freely available tutorials on this very topic.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900