I'm trying to add a int to the first four bytes of a char * and then later on I have to extract the int from the char *.
char *foo = " number";
int num = 123456;
But this seems to segfault. What am I doing wrong?