
#include <stdio.h>

#define NUMELEM(a) (sizeof(a)/sizeof(a[0]))

char *command[] = {
	"ADD",
	"DELETE",
	"LIST",
	"REPLACE"
};

main()
{
	int i;

	for (i = 0; i < NUMELEM(command); ++i)
		printf("command[%d]: %s\n", i, command[i]);
}


output:


command[0]: ADD
command[1]: DELETE
command[2]: LIST
command[3]: REPLACE

