2009-06-25 21:16:37 UTC
hello world's
hello
world's
I wrote most of the program but I need help on getting started with teh function that will do the parsing. Can anyone get me started?
%%%%CODE%%%%
#include
#include
#define MAXLENGTH 256
char *next_word(char *instring, char **new_start);
int main()
{
char instring[MAXLENGTH];
char *words=NULL;
char *parsed=NULL;
printf("Enter the ******* text:\n");
fgets(instring, MAXLENGTH, stdin);
puts(instring);
words=next_word(instring, &parsed);
while (words != NULL)
{
printf("%s\n", words);
words=next_word(parsed, &parsed);
}
}
char *next_word(char *instring, char **new_start)
{
}