blob: 48202dba1b5bb067209955173a8a1d8cd746f566 [file] [log] [blame]
/* calloc() and free() using function pointers */
#include <stdlib.h>
typedef void *(*cptr)(size_t, size_t);
typedef void (*fptr)(void *);
int main()
{
cptr c;
fptr f;
int *i;
c = calloc;
f = free;
i = c(1, sizeof(int));
f(i);
*i = 99;
return 0;
}