Reputation: 683
I need to make a program which takes as input on text file and output the same string with one replaced word; the main function will take 3 parameters (wordR, wordS, file). So can anyone help me with a good tip how I can scan the words in c?
Upvotes: 0
Views: 104
Reputation: 490148
The obvious possibility would be [fs]scanf
's "%s" conversion:
char one_word[64];
fscanf(input_file, "%63s", one_word);
Upvotes: 2