#include stdio.h
#include stdlib.h
int main(void)
{
int *p;
p = 0x42;
printf("Pointer before malloc(): %p\n", p);
p = (int *)malloc(sizeof(int));
printf("Pointer after malloc(): %p\n", p);
return (0);
}

Posted on by