c Linked List

1 Comment

C program for sorting a Linked List

C program for sorting a Linked List. #include<stdio.h> #include<dirent.h> #include<malloc.h> #include<string.h>   void main (int argc,char * argv[]) { DIR * directory_pointer; struct dirent* entry; struct File list { char filename[64]; struct File * new; } start,*node,* previous, * new; if((directory_pointer=opendir(argv[1]))==NULL) printf("Error opening %s\n", argv[1]); else { start.next + NULL; while (entry = readdir (directory_pointer)) […]