char * strcpy ( char * dest, const char * src );
Copies the string pointed by src into the array pointed by dest, including the terminating null character.
#include <stdio.h>
#include <string.h>
int main() {
char q[] = "madeeasy2016";
char *p = q+4;
/* String literal "madeeasy2016" is lying somewhere in the read-only area of memory.
q is pointing to the address of 'm' and now p is pointing to the address of second 'e'
*/
printf("%s\n",p);
/* easy2016 will be printed */
strcpy(p,"best");
printf("%s\n",q);
return 0;
}
So, madebest will be printed.