title: passing a global variable in one C file to another
body: <p>Let's say I have a global variable       </p>
  
  <pre><code> char  Dir[80];  /* declared and defined in file1.c  but not exported using extern etc */
  </code></pre>
  
  <p>The Dir variable is the name of a directory created at run time in the program's main().
  In this file we manipulate this variable and pass it to  a function func defined in file2.c
  This Dir variable is a directory in which all functions create thier individual logs.   </p>
  
  <p>Instead of passing this variable n number of times to each one of the functions which finally called func().I made it global.</p>
  
  <pre><code>func(x,Dir); /* x is a  local variable in a function  */
  </code></pre>
  
  <p>/* now in file2.c */     </p>
  
  <pre><code>void func(int x,char *Dir)
  {
     /*use this variable Dir */
  }
  </code></pre>
  
  <p>The value of Dir we receive here is not the same as in file1.c. Why ?
   Compiler: gcc on Windows </p>