title: String terminator in character array in C
body: <p>I'm trying to make a program to decide the validity of a password, based on a set of rules.</p>
  
  <p>Here is what I have:</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()
  {
    int uppercase = 0;
    int length = 0;
    int numbers = 0;
    int others = 0;
    char password[13];
    char yesOrNo;
    printf("Your password must be 8-12 characters long.\n"
           "It must contain at least one symbol, uppercase letter, and number.\n\n");
   COMEBACK:
    printf("Please enter your password:");
    scanf(" %s", &amp;password);
    while (password != 'NULL') { // Tried 0 here, tried '\0', but to no avail.
      if (isalpha(password)) {
        length += 1;
        if (isupper(password)) {
          uppercase += 1;
        }
      }
      else if (isdigit(password)) {
        numbers += 1;
        length += 1;
      }
      else {
        length += 1;
      }
      // This is just a test, to see if it was working.
      printf("%d - %d - %d - %d --- %s",
             uppercase, length, numbers, others, password);
    }
    if ((uppercase &gt; 0) &amp;&amp; (numbers &gt; 0)
        &amp;&amp; (length &gt;= 8) &amp;&amp; (length &lt;= 12) &amp;&amp; (others &gt; 0)) {
      printf("Good job, you've done your password correctly.");
    } else {
      printf("%d - %d - %d - %d --- %s \t Incorrect..",
             uppercase, length, numbers, others, password); // Same thing here.
      scanf("%s", &amp;yesOrNo);
      switch (yesOrNo) {
      case 'y':
        goto COMEBACK;
        break;
      case 'n':
        printf("Sorry you're dumb man..");
        break;
      default:
        printf("Please enter a valid password.");
      }
    }
    return 0;
  }
  </code></pre>
  
  <p>The problem I am having is, the while loop never ends because it can't seem to find the terminator for my password array. I've inputted '\0' as well as just '0'. But I still can't figure it out. Any help is appreciated. Thanks.</p>