title: Check if program is installed in C
body: <p>I'd like to find a way to find out if a program is installed using C gnu11 standard, for example, will the command 'Rscript' work if it is executed using the <code>system</code> function in C.</p>
  
  <p>I'm not a programmer by training, so I'm not sure if I'm using the correct search terms.</p>
  
  <p>I would like the C equivalent of</p>
  
  <pre><code>con@con-Inspiron-3521:~/Scripts$ which Rscript 
  /usr/bin/Rscript
  </code></pre>
  
  <p>how can I do that in C?</p>