[Adobe]generic malloc function

write a user defined generic malloc function.Inside this function you may call standard malloc function.The prototype of this function should be void malloc1(anything that you wish).

Comments

  1. void malloc1(void **p,int size)
    {

    *p = malloc(size);
    }
    int main()
    {
    int *p;
    malloc1(&p,4);
    *p = 10;
    printf("%d",*p);
    return 0;
    }

    ReplyDelete

Post a Comment

Popular posts from this blog