char *origPtr = malloc (2); char *ptr = origPtr if (ptr) { *(ptr++) = 'A'; // pointer changed here *ptr = 0; ... free (origPtr); }