Hi all,

I am new to C and am writing a small application in C. One part of it is to fire some system commands and store the output in some variable.

A small example of what i wanna do:

Code:
 
int main(void)
{
      return system("ifconfig | grep 'inet addr'");
}
now i want to store the output of system() in a string (or an array of String). I tried out many things but nothing seems to work.

Will be very happy if somebody could help me out in this