Let's say that I have a buffer of chars and I want to avoid using memcpy, and access to it through an int* variable:
char buffer[100];
strcpy(buffer,"Hello");
int* __restrict ptr=(int*)buffer;
*ptr= 97;
printf("%s",buffer);
Now this of course prints "a".
Am I allowed to do this without encountering an undefined behaviour?