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
Like other answers, I would also recommend just using an array of strings as a lookup table. If you assume all the status codes are unique, an array of strings is by far the easiest implementation for a smaller set of data.
Once you start storing larger amounts of data, that is when hashmaps start becoming useful. A lookup array is the solution here, but as you said you're learning C, you can actually implement a hashtable in native C by using dynamic memory (a critical concept to learn for C.) This website explains how to create a hashtable in C very well.
http://www.sparknotes.com/cs/searching/hashtables/section3.rhtml