word count

This is a discussion on word count within the C Programming forums, part of the General Programming Boards category; I need help! im making a programme that counts the number of words and characters in a file but have ...

I have managed to count charaters but i have got it so you type a word and it count the characters you have typed but not how many characters are in a file. for example you type hello it will count 5 but if you have a hello.c file it wont count the characters in that file thats the part im struggling with. its mostly a read file problem i think