As suggested, use pointers, e.g.
#define ITEMS 13
const char * info[ITEMS]=
{
"christina",
"victor",
"chris",
"chester",
"elta",
"kezia",
"bew",
"grace",
"mavis",
"tony",
"oat",
"adonique",
"ploy",
};
Then, for instance, the
swap
operation becomes
void swap( const char * info [], int i, int j)
{
const char * tmp = info[i];
info[i] = info[j];
info[j] = tmp;
}
And other opeartions, like
compare
and
sort
, might be implemented in a similar way.