title: The C Programming K&R Exercise 1-11
body: <p>I'm currently coming thru Word Counting program . And i got a tricky Exercise.<br>
  I can't understand what exactly this exercise want me to do . </p>
  
  <p>Here the Exercise itself<br>
  <strong>Revise the word counting program to use better definition of "word," for example, a sequence of letters,digits and apostrophes that begins with a letter</strong></p>
  
  <p>I cant get what it actually want .It want me to count symbols digits apostrophes or ether it want me to put names for all those symbols digits etc. like "word," - will be <code>A(") word comma(,) A(")</code>
  or there something else.  </p>
  
  <p>This is the program which counts lines, characters, and new lines </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  #define YES 1
  #define NO 0
  
  main ()
  {
      // CTRL+Z will Signal to EOF-End of File 
      int c,nl,nw,nc,inword;  //nl -new line
                              //nw -new word
                              //nc -new chatacter
                              //inword -program in word or not
  
      inword=NO;
      nl=nw=nc=0;
      while ((c=getchar()) !=EOF)
      {
          ++nc;
          if (c == '\n')
              ++nl;
          if (c == ' ' || c == '\t' || c == '\n')
              inword=NO;
          else if (inword==NO)
          {
              inword=YES;
              ++nw;
          }
      }
      printf("%d %d %d\n", nl,nw,nc);
  
      getchar(); 
  }
  </code></pre>
  
  <p>Can you guys explain to me what actually the Exercise want me to do?  I don't need already complete code. Iwant to go thru the coding myself. I just don't get what i actually need to do here in Exercise.</p>