Code:
double call_by_name(const char *name, int arg) { static const char *names[] = {"sin", "cos", "tan", NULL}; static double (*fp[])(double) = {sin, cos, tan}; for (int i = 0; names[i] != NULL; i++) if (strcmp(names[i], name) == 0) return ((*fp[i])(arg)); return 0; } Why are arrays *names[] and *fp[] have the keyword static ? What is it for in this context?