Thank you,
how could I write the code to read the words from the file?
would it be something like this:
/* getword */
int getword(char *word, int lim)
{
int c, fgetc(input_ptr);
...
Type: Posts; User: haz115
Thank you,
how could I write the code to read the words from the file?
would it be something like this:
/* getword */
int getword(char *word, int lim)
{
int c, fgetc(input_ptr);
...
I am really bad at this, could you please help me! so far I have:
#include <stdio.h>
#include <ctype.h>
#include <string.h>
struct wordcount {
int count;
char *word[64];
}
Could anyone give me some help with the following task (without using a binary tree)?
I have to write a function that reads a file of words and populates the array "wordlist" with the words in the...
Thanks, I am trying to do it without using a binary tree (thats the next question!). I have some code which i think does a similar job to the program I am trying to create but reads the characters...
Thanks, I am trying to write a function that reads a file of words and populates the array "wordlist" with the words in the file, and the count of how many times each occurs.
I then have to use this...
I am trying to define a structure called "wordcount" which has 2 fields: a character array of length 64 called "word" and an integer called "count". How could I do this?
Also, how would I declare...
ok, would it be something like this:
while ((ch=fgetc(input_ptr))!=EOF))
{
if ((ch == 0x20) /*or should I write ==' ' ?*/
++count
}
printf("The number of words is...
How could I write a program that reads a file of words (assumed to be in lower case letters) and prints out the total number of words in the file?
Would it be something like this?:
#include...
Thanks again,
OK last question.....
how could i get the program to read a file of words(assumed to be in lower case) and print out the the total number of words?
I guess i wouldn't need the...
Thank you everybody so much!
How could I modify the program so that instead of converting the characters, it copies all the lower case letters and white space characters to the output file,...
Whereabouts exactly, and how?
Can anyone please help?
I've been given the problem:
Write a C program that reads text from an input file, converts
any upper case letters to lower case, and writes the resulting text to an...
Can anyone help with the following problems?
1.a) Write a C program that reads text from an input file, converts any upper case letters to lower case, and writes the resulting text to an output...