|
const keyword
ANSI C adds const, an attribute indicating that a declared object is unmodifiable and hence may be compiled into a read-only memory segment. For example:
const int i; /* constant int */
const int *ip; /* variable pointer to constant int */
int *const ip; /* constant pointer to variable int */
typedef struct /* define the struct 'cmd_entry' */
{
char *command;
void (*function)(void);
} cmd_entry
const cmd_entry table[]= /* declare a constant object of type 'cmd_entry' /*
{
"help", do_help,
"reset", do_reset,
"quit", do_quit
};
E-mail: info@telesys.ru