title: while loop not executing
body: <p>I made a while loop inside a program and the program reaches the while loop, but it doesn't execute. I feel like there's a really tiny error that I'm missing since I've been looking at the code for so long. </p>
  
  <pre><code>  int strbuf = 100;
    char string[strbuf];
    char *exit = "exit";
    while(!strcmp(string, exit)){
        printf("Enter a word to search. Enter exit to quit");
        scanf("%s", string);
        state = present(fIndex, string);
        if(state){
          printf("The word %s was found on line %d", string, state);
      }
  }
  </code></pre>
  
  <p>EDIT: the input is from the keyboard. 
  EDIT EDIT: NEW CODE (same problem)</p>
  
  <pre><code>int strbuf = 100;
  char string[strbuf];
  char *exit = "exit";
  
  printf("Enter a word to search. Enter exit to quit\n");
  scanf("%s", string);
      while(!strcmp(string, exit)){
      state = present(fIndex, string);
      if(state){
          printf("The word %s was found on line %d", string, state);
      }
      else printf("The word %s was not found", string);
  }
  </code></pre>