title: Relative path interpretation on linux -gcc env
body: <p>I have a question related to how relative paths are interpreted in various environments .
  If I have a C code to be compiled on linux using Makefile and gcc , and if some source file has :</p>
  
  <pre><code>fopen(“../../xyz.ctl”, ”r”); 
  </code></pre>
  
  <p>where should this file be located. Or in other words,
  if I have </p>
  
  <pre><code>fopen(“xyz.ctl” , ”r”); 
  </code></pre>
  
  <p>would the compiler look for xyz.ctl in same folder as the:-</p>
  
  <p>a.) Where source file having this statement fopen is present?</p>
  
  <p>b.) Where  makefile is present ?</p>
  
  <p>c.) Where the linux executable would be generated ?</p>
  
  <p>I know that MSVC all relative paths are from the folder which has the *.dsw (workspace file). For RVDS environment it begins from the folder where the executable *.axf is generated.</p>
  
  <p>-AD</p>