I am trying to print the memmory address that malloc allocates
AND print the memory address that has been freed.
how do I do that?
Code:#include <stdio.h> #include <string.h> #include <stdlib.h> int main (void) { char *pt; pt=(char*)malloc(40); if (pt==NULL) { perror("dynline1"); exit(1); } strcpy(pt, "abcdefghijklmnopqrstuvxyz"); puts(pt); free(pt); return 0; }