Saturday, May 22, 2010

How do you display a listing of the curent directory from within a C program?

#include %26lt;stdio.h%26gt;





int main(void)


{


printf ("Executing command la -l ...\n");


system ("la -l");





return 0;


}

How do you display a listing of the curent directory from within a C program?
use system() stdlib.h





printf ("Executing command DIR...\n");


system ("dir");

gifts

No comments:

Post a Comment