I\'m currently learning c. I\'m writing a web server as an exercise.
Now i have to store the status codes and reason phrases.
What is the best way to store those
I would use a sorted array.
You can define the array in any order, and sort it at run-time (once) with the qsort() function. Then you can do binary searches using bsearch(). The total number of response codes is small, a binary search will be very fast.
This has the advantage of not needing any external code, for something simple like this.