I came across this in an IRC channel yesterday and didn't understand why it was bad behavior.
#include <stdio.h>
int main(void)
{
char x[sizeof(int)] = { '\0' }; int *y = (int *) x;
printf("%d\n", *y);
}
Is there any loss of data or anything? can anyone give me any docs to explain further about what it does wrong? thanks!