title: How Can I replace this type "int" by"String" in c programming?
body: <p>I'm using dev c++ . This is silly program which ask the correct key to show a text. This program working perfectly with type "int" (just numbers):</p>
  
  <pre><code>    #include &lt;stdio.h&gt;
      #include&lt;conio.h&gt;
  
      main()
      {
          int key;
  
          printf("This program show a mensage if you get the correct key \n");
          printf("Write the key:\n");
          scanf("%i",&amp;key);
              if(key==1234)
              {
                  printf("Welcome to stackoverflow \n");
              }
              else
              {
                  printf("You keep going slept \n");
              }
              getch();    
           return 0;
  
      }
  </code></pre>
  
  <p>But How can I replace for strings for example: sesame, house and so on.</p>
  
  <p>I've tried by matrix:</p>
  
  <pre><code>char key[];
  </code></pre>
  
  <p>However i get Error.</p>
  
  <p>Sincerily
  NIN.</p>
  
  <p><strong><em>Update:</em></strong></p>
  
  <p>I could get a new program :</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  
  main()
  {
      char key[7]; /*replace int for char*/
  
      printf("This program show a mensage if you get the correct key \n");
      printf("Write the key:\n");
      scanf("%c",&amp;key);
          if(key=="sesame") /*numbers for string*/
          {
              printf("Welcome to stackoverflow \n");
          }
          else
          {
              printf("You keep going slept \n");
          }
          getch();    
       return 0;
  
  }
  </code></pre>
  
  <p>However even though I fix the correct key ("sesame") I just get "You keep going slept"</p>