title: mkdir system call with variable (C)
body: <p>I'm new to Linux system programming. The task is: create system variable "MY_DIR" with valuable "lab01" and create any file inside it.</p>
  
  <p>I've successfully created folder, but I can't create any file using varialble</p>
  
  <pre><code>putenv("MY_DIR=lab01");
  mkdir_ret_code = mkdir(("/home/Alexander/%s",getenv("MY_DIR")),0777);
  </code></pre>
  
  <p>How to solve this problem?</p>