What is calloc()

1 thought on “What is calloc()”

  1. The calloc() function is used to allocate a specified amount of memory and initialize it to zero. The function returns a void pointer to this memory location, which can then be cast to the desired type.


    int main() {

    int* a = (int*) calloc(5, sizeof(int));

    return 0;

  2. Reply

Leave a Comment