C tips and tricks: transfering data from pointer to array
This Gist is a WIP
Unfortunately we can't assign an allocated space from a pointer to an array directly
That actually gives the following output error: incompatible types when assigning to type ...
Either use string.h's memcpy or do a manual loop.
memcpy()
for(long i = sizeof(tmp)/sizeof(tmp[0]); i--; ) tmp[i] = text[i];
Reference: incompatible types when assigning to type 'array[256]' from type 'array *'