while(scanf("%s",word)==1)
{
for(j=0;j<=MAX_LEN;j++)
{
if(word[j]==','||';'||'.'||'!'||'?')
j='\0';
}
it makes sense to me logically. scans the array (word) until it finds \0. increments to the max length which is 15 (given to us by teacher). if the variable at position j is one of those characters the make that character \0. what is wrong?

New Topic/Question
Reply



MultiQuote




|