Would you please help me in writing a c code to read data from a file and perform 1)numeric sort, 2)alphabetical sort.
the file may contain data of any kind.Like it may contain only numbers,only names or a database of employees of a company.(which contains their employee id,name,designation and salary,....in different fields).Each line contains details of one employee.
Sorting has to be done based on field specified.i.e,if sorting has to be done considering 3rd field(designation),
alphabetical sort has to be performed.And if the specified field contains information other than name or designation numeric sort has to be performed.
I would prefer a c program to solve the above problem.