title: Program crashes
body: <p>I'm trying to write a code to check a password for an uppercase letter.
  When I type a password with an uppercase letter, the program runs as expected (prints out '1' and the entered password).
  However, if I type a password without an uppercase letter, the program crashes.</p>
  
  <p>My code:</p>
  
  <pre><code>#include &lt; stdio.h &gt;
  #include &lt; stdlib.h &gt;
  #include &lt; ctype.h &gt;
  #include &lt; string.h &gt;
  #include &lt;math.h&gt;
  
  int main() {
  
      char password[100];
      int i = 0;
      int upper = 0;
  
      printf("Enter a password with an uppercase letter: ");
      scanf("%s", password);
  
      for (i = 0; i &lt;= 100; i++) {
          if (isupper(password[i])) {
              upper = 1;
              break;
          }
      }
  
      printf("%d\n", upper);
      printf("%s\n", password);
  
      system("pause");
      return (0);
  }
  </code></pre>
  
  <p>The errors:</p>
  
  <blockquote>
    <p>Debug Assertion Failed!</p>
    
    <p>Program:
    ...15\Projects\ConsoleApplication3\Debug\ConsoleApplication3.exe File:
    minkernel\crts\ucrt\src\appcrt\convert\isctype.cpp Line: 36</p>
    
    <p>Expression: c >= -1 &amp;&amp; c &lt;= 255</p>
    
    <p>For information on how your program can cause an assertion failure,
    see the Visual C++ documentation on asserts.</p>
    
    <p>(Press Retry to debug the application) ConsoleApplication3.exe has
    triggered a breakpoint.</p>
    
    <p>Debug Assertion Failed!</p>
    
    <p>Program:
    ...15\Projects\ConsoleApplication3\Debug\ConsoleApplication3.exe File:
    minkernel\crts\ucrt\src\appcrt\convert\isctype.cpp Line: 42</p>
    
    <p>Expression: c >= -1 &amp;&amp; c &lt;= 255</p>
    
    <p>For information on how your program can cause an assertion failure,
    see the Visual C++ documentation on asserts.</p>
    
    <p>(Press Retry to debug the application) ConsoleApplication3.exe has
    triggered a breakpoint.</p>
    
    <p>The program '[13188] ConsoleApplication3.exe' has exited with code 0
    (0x0).</p>
  </blockquote>