title: Call a Linux executable from C ( Ubuntu )
body: <p>Normally I call the following executable like </p>
  
  <pre><code>./DNS www.google.com A 
  </code></pre>
  
  <p>But when I want to call it from another location like </p>
  
  <pre><code>/home/ion/workspace/DNS/Debug/./DNS www.google.com A
  </code></pre>
  
  <p>It throws me segmentation fault </p>
  
  <p>I need these because I want to call it from another C application like </p>
  
  <pre><code>sprintf(command,"/home/ion/workspace/DNS/Debug/./DNS %s %s","www.google.com","A")
  </code></pre>
  
  <p>I am not sure if this is correct to call an executable like that. Can anyone can help me please? Thanks!</p>