[Solved] How to sort a text file based on a string and search [closed]


Now how can I sort the data by id

With a sort. Since this smells like homework, you may or may not be allowed to use the venerable qsort function.

(I don’t know how to get the number of elements in that string)

strlen

and how to search by name or address

Try using functions such as strcmp to compare strings.

2

solved How to sort a text file based on a string and search [closed]