Output of the Linux System Call in C program

I want to manipulate the output of the ls -al command in my C program.
Is there a way to do it ?

int main()
{
    int return_value;
    return_value = system("ls -al ");
    return return_value;
}


Source: unix

Leave a Reply