I'm trying to implement strcpy within my main but I'm not sure why I'm segfaulting on the first while loop. Could someone shed light?
int main()
{
const char* src = "this is a test";
char* dest = "abcdefgqwerty";
char* head = dest;
while(*dest++ = *src++);
while(*head++)
{
printf("%c", *head);
}
return 0;
}