title: system("cd <path>") in a C program
body: <p><br>
  I'm trying to use the system() function in a C program.<br>
  For example, I tried to create a directory on my desktop, using the system() function.<br>My code:<br></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(void)
  {
     system("cd c:\\Users\\USER\\Desktop");
     system("mkdir test");
     return 0;
  }
  </code></pre>
  
  <p>When I run this code, a directory is created, but not on my desktop. It is created in my project directory.<br>
  Why is this happens?<br>
  Can I use the cd command in the system() function? If not, is there an replacement to the cd command that will work with system()?<br></p>
  
  <p>I'm using Windows OS. I'm trying to use system() from a C program as I use cmd program.<br>
  <em>I know that I can create the directory using WinAPI without any problem. I don't want to use WinAPI, my question is how can I make it work using system().</em></p>