title: C programming: how do I terminate the program after the user enters a sentinel value?
body: <p>so I first #define SENTINEL -1</p>
  
  <p>and in a certain function, I set up an if statement </p>
  
  <pre><code>void blahblah(blah)
  {
     printf("Enter an integer (-1 to quit)");
     scanf("%d", &amp;value);
     if (value == SENTINEL)
       return;
  }
  </code></pre>
  
  <p>but for some reason it's not terminating the program like I want it to?</p>