Added memory allocation sample in C