Add 4 memory allocate samples in C