title: How do you run a cmd command in a C program
body: <p>I couldn't seem to figure out how to run a cmd program in a C program.</p>
  
  <p>This is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  int main()
  {
      char educode[100];
      printf("Welcome To ACE-IT Edu Software!\n");
      printf("\nPlease Type An Educator Code and then press enter.");
      printf("\nEducator Code: ");
      gets(educode);
      if(educode == 5678){
          system("mkdir test");
      } else {
      printf("\nSorry, thats not a valid Educator Code. To buy an Educator Code, go to https://www.ace-it.edu");
      }
  
  
      return 0;
  }
  </code></pre>