Alternative usage to `typedef` in C

Variable length array(in runtime) and Typedef array type

GNU C's variable array declaration is very convenient, instead of int *a; then use malloc(sizeof(int) * size) then copy data with memcpy(3 steps required), you can directly code with int a[size];.

There are another feature you may want to know, you can define a type at any size you want by typedef char data_t[size], this feature is really good because it can be done in runtime, this provide a short cut for indexing void *. Instead using (char *)init_ptr + ind * elem_size' for indexing, we can replace it by (data_t *)init_ptr[ind]. This could save many indexing problems, but the bad news is that we need to define the type by the storage many times.