title: Making the input of scanf appear as asterisk on terminal
body: <p>I would like the input on the <code>scanf</code> to show as asterisks opposed to the actual letters.
  For example, when the program asks for a password, I would like it to show &quot;******&quot; instead of &quot;PRG255&quot;.</p>
  <p>Please let me know what you think and if it is possible with the current format of the code.
  This way, the password can stay safe if someone is looking at the user input the password.</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdlib.h&gt;
  
  
  int main()
  {
  
      int  stop = 0, length, i, key=55;
      char decider, data[50], password[]=&quot;PRG255&quot;, passwordCheck[7];
      
      while (stop != 1)
      {
          decider = NULL;
          printf(&quot;\n(E)nter and encrypt a message \n(V)iew encrypted message\n(D)ecrypt and view message (password protected)\n(Q)uit\n\n&quot;);
          scanf(&quot; %c&quot;, &amp;decider);
  
          switch (decider)
          {
          case 'e':
          case 'E':
              flushall();
              printf(&quot;\nEnter data to encrypt: &quot;);
              scanf(&quot;%s&quot;, data);
  
              length = strlen(data);
  
              for (i = 0; i &lt; length; i++)
              {
                  data[i] = data[i] ^ key;
              }
  
              
              break;
          case 'v':
          case 'V':
              printf(&quot;\n%s\n&quot;, data);
              break;
          case 'd':
          case 'D':
              
              for(i = 0; i &lt; 3; i++)
              {
                  printf(&quot;please enter password(three attempts)\n&quot;);
                  scanf(&quot;%s&quot;, passwordCheck);
                  if (strcmp(password, passwordCheck) == 0)
                  {
                      for (i = 0; i &lt; length; i++)
                      {
                          data[i] = data[i] ^ key;
                      }
                      printf(&quot;\n%s\n\n&quot;, data);
                  }
                  
              }
              if (strcmp(password, passwordCheck) != 0)
              {
                  printf(&quot;invalid password enetered three times! program will terminate now!\n\n&quot;);
                  return 0;
              }   
              break;
  
          case 'q':
          case 'Q':
  
              return 0;
              break;
          default:
              printf(&quot;An invalid option was selected!\n\n&quot;);
  
  
          }
      }
  }
  </code></pre>