Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <limits.h>
- int main(void){
- FILE *fp;
- int status;
- char path[10], Info[400];
- fp = popen("ls *", "r");
- while (fgets(path, 10, fp) != NULL){
- strcat(Info, path);
- }
- status = pclose(fp);
- printf("%s", Info);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement