title: (C Programming) User name and Password Identification
body: <p>Why do I get <code>format '%s' expects argument of type 'char*'</code>? How should I fix the problem? </p>
  
  <p>Here are my codes:</p>
  
  <pre><code>char UserName[] = "iluvcake";
  scanf("%s", &amp;UserName);
  printf("Please enter your password: \n");
  char PassWord[] = "Chocolate";
  scanf("%s", &amp;PassWord);
      //if...else statement to test if the input is the correct username. 
      if (UserName == "iluvcake") 
      {
       if (PassWord == "Chocolate"){
       printf("Welcome!\n");
      }
      }else
      {
       printf("The user name or password you entered is invalid.\n");
      }
  </code></pre>