Create test_snippet.c

working on cleaner memory allocation