title: C passing a string containing a file path to main()
body: <p>I want to pass a string that contains a file path </p>
  
  <pre><code>/home/bin/example.txt
  </code></pre>
  
  <p>from</p>
  
  <pre><code>char path[50];
  char passpath()
  {
  // do something
  // ...
  return(path); 
  }
  </code></pre>
  
  <p>to my main function.
  In passpath()</p>
  
  <pre><code>printf("%s\n", path);
  </code></pre>
  
  <p>gives the right path back (<code>/home/bin/example.txt</code>). Bun when I try the same in my main function the first "/" is missing and <code>printf("%s\n", path);</code> results (in eclipse) in</p>
  
  <pre><code>(some unresolved sign with "?" in it)home/bin/example.txt
  </code></pre>
  
  <p>what went wrong here?
  Thank you!</p>