I'm actually learning C and I got a "problem".
I created a pointer to a structure with a char* and int with malloc(1). The pointer works and I can edit structure children without problems.
I also created a pointer to a int (still with malloc(1)) and it works. Another thing is I didn't get core dump error when I tried to access *(pointer + 33780) (Core dump comes when the value is a bit higher) it worked, but default value was 0.
Thank you, that's not a "problem" but I'd like to know why is that doing like this.
Sorry for being the English's murderer.
EDIT : Here the code
struct Personne
{
char *name;
int age;
};
int main(int argc, char *argv[])
{
printf("%ld\n", sizeof(struct Personne));
struct Personne *testPoint = malloc(1);
printf("testPoint : %p\n", testPoint);
printf("testPoint : %p\n", testPoint->name);
testPoint->name = "UnNomInconnu";
testPoint->age = 20;
free(testPoint);
return 0;
}