To allocate memory dynamically and initialize it to a specific value, the ________ function can be used in C.

  • calloc()
  • free()
  • malloc()
  • realloc()
In C, the "calloc()" function is used to dynamically allocate memory and initialize it to a specific value. It takes two arguments for the number of elements and the size of each element, allocating memory for an array.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *