title: Infinite while loop and control-c
body: <p>So, I wrote the following code:</p>
  
  <pre><code>void main(void) {
  
  int charNums[ALPHABET], i = 1;
  char word[MAX];
  
  while(i) {
  
      initialize(charNums, word);
  
      getString(word);
      setLetters(charNums, word);
  
      getString(word);
      checkLetters(charNums, word);
  
      if(isZero(charNums))
          printf("Anagram\n");
      else
          printf("Not anagram\n");
  }
  }
  </code></pre>
  
  <p>The while loop is infinite, which it is supposed to be.  My professor said something about using CTRL-C to exit the infinite while loop, but that doesn't work with what I've coded.  Am I missing something simple or what?  Can someone please point me in the right direction?  Thank you!  (Note: this is only a portion of the code.)</p>