Below is the program for sorting the file in ascending and reverse order this program is working properly under window but it gives segmentation...
Separate names with a comma.