While writing C codes, many times you will need to write an array of input-output like pairs table. One of the most common example is to have a table containing state/command – function pointer pairs, which basically is a look up table of the function pointers to be executed based on the given input state/command. In this case, you would probably want to use X-macros to avoid/reduce mistakes in your code. Here is great tutorial on how to use x-macros for this purpose which I found on embedded.com:
It is really worth to spend 30 minutes reading it!