I have wrote a code to have the user input a filename and then the amount of
words in the file will be displayed.
However i want it to recognise the delimiters space, comma, fullstop or
newline and not count them as words eg. aaa .bb.ccc has 3 words
I have included the full code without it counting delimiters below. I have
tried to add the following line to have it recognise the delimeters and not
count but it doesnt work:

if ((inword != '\n' || ',' || '.' || ' '))
word_count++;

any ideas what im doing wrong?

also i know i can use strtok but i want to do it without this!

#include <stdio.h>
#include <stdlib.h>
#define MAX_LENGTH 256

int main(void)
{
FILE *fp;
char ch, filename[40];
int word_count=0;
char inword[MAX_LENGTH];


/*get file name and open*/

while(1) {
printf("\nEnter a filename: ");
scanf("%s", filename);
/*check if the file is valid*/

if( (fp = fopen(filename, "r" )) !=NULL )
{
printf("\n Succesfully opening %s. \n", filename);
break;
}
else
{
fprintf(stderr, "\n error opening file %s.\n", filename);
puts("Enter x to exit, any other to try again.");
ch=getchar();
ch=getchar();
if( ch == 'x' )
exit(0);
else
continue;
}
}


/*count the words in the file*/

while (!feof(fp) ) {
fscanf( fp, "%s", inword);
word_count++;
}
printf("there are %d word(s) in the file %s\n", word_count, filename);

/*close file*/

fclose(fp);

return 0;

}