   weird array problem
  HiI am trying to write a program that counts the number of characters in a word and then outputs it to the screen. First the source code:#include <stdio.h>int main(void){int i, m, c, nword[50];for(m = 0; m<50; ++m){nword[m] = 0;}i = 0;while ((c=getchar()) != ''EOF''){++nword;if (c==''\t'' || c=='' '' || c==''\n'')printf("Length word: %d", nword);++i;}return 0;}What I am trying to do is that everytime getchar gets a character, the program increments nword with &#111;ne. If the program encounters a tab, newline or space, it prints the length of the first word, and then increment i , like going to the next word (if i = 0 I mean the first word, if i = 1 the second word etc.) But the output is very weird and I don’t know what I am doing wrong. I would be very glad if someone could help me out here. Thanks in advance.  </i>  
oups...forget the last post....   more comming in 2 minutes!! ;  Don''t bother, I solved the problem, it was that the function printf and the stament ++i had to be between {} so that they were both executed ''inside'' the IF.  