I've been so swamped with other finals that I've fallen behind 2 chapters in my programming class...
Someone here know how to write this in C?
Write a program that prints the number of words found in a text file. Words are defined as sequences of characters separated by white space. (Hint: white space is defined as in the fscanf function when reading a string). The program should prompt the user for the name of the file to be analyzed. It is assumed that the words in the text file are all shorter than 256 characters, and that the name of the text file is shorter than 64 characters.
The program should reproduce the following format when compiled and executed:
Enter the file name: myfile.txt
myfile.txt contains 167 words.