<p>Here's what I am trying to do:  </p>

<pre><code>typedef enum { ONE, TWO, THREE } Numbers;
</code></pre>

<p>I am trying to write a function that would do a switch case similar to the following: </p>

<pre><code>char num_str[10];
int process_numbers_str(Numbers num) {
  switch(num) {
    case ONE:
    case TWO:
    case THREE:
    {
      strcpy(num_str, num); //some way to get the symbolic constant name in here?
    } break;
    default:
      return 0; //no match
  return 1;
}
</code></pre>

<p>Instead of defining at every case, is there a way to set it using the enum variable like I am trying to do above?</p>

There's no built-in solution. The easiest way is with an array of
```
char*
```
where the enum's int value indexes to a string containing the descriptive name of that enum. If you have a sparse
```
enum
```
(one that doesn't start at 0 or has gaps in the numbering) where some of the
```
int
```
mappings are high enough to make an array-based mapping impractical then you could use a hash table instead.