void * memset ( void * ptr, int value, size_t num ); It exists on the heap. as does your memory buffer. which can be *array or array[0] both the same. Arrays are pointers. The thing I dont understand though; shouldnt it be '\0' for null character? Instead of 0 and why does that work?