home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_05
/
9n05022b
< prev
next >
Wrap
Text File
|
1991-03-18
|
349b
|
30 lines
#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