The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-12-2008
eldaran eldaran is offline
Registered User
 

Join Date: May 2008
Posts: 4
How do I get system answer in c

How do I get the answer of a system call that is printed in the terminal?

for example:

I execute system("pwd");
and get the answer /home/user/

But because I need to send this result to somewhere, I need to store it in a string.

Thanks in advance.
Reply With Quote
Forum Sponsor