Short answer: Here functab is an array of pointers to functions, and the array is initialized with pointers to functions ram and date . This also explains the name functab, which probably refers to "FUNCTION TABLE".
Long answer: in C you can get a pointer to a function and save it in a variable. The variable used in this way is called a function pointer.
For example, the funcptr variable funcptr will contain the address of the do_stuff entry do_stuff :
int do_stuff(const char* x) { ...do stuff.. } ... ftype_t funcptr = &do_stuff; ... (*funcptr)("now");
This will only work if you have already defined the type funcptr , which is located here ftype_t . The type definition should take the following form:
typedef int (*ftype_t)(const char*);
In English, this means that ftype_t is defined as a type of function that takes const char* as its only argument and returns int .
If you didn’t want a typedef just for this, you could achieve the same by doing the following:
int (*funcptr)(const char*) = &do_stuff;
This works, but its syntax is confusing. It also gets pretty ugly if you try to do something like building an array of function pointers, which is what your code does.
The following is equivalent code that is much easier to understand:
typedef static const char*(*myfn_t)(void); const myfn_t functab[] = { &ram, &date };
(and (address) is usually optional but recommended.)