rajesh
Asked: In: Computer Science
What is calloc()
What is calloc()
malloc vs calloc | calloc vs malloc in c | malloc vs calloc vs realloc | free() in c | why malloc is faster than calloc | calloc hair | man calloc | difference between malloc and calloc and realloc
malloc vs calloc | calloc vs malloc in c | malloc vs calloc vs realloc | free() in c | why malloc is faster than calloc | calloc hair | man calloc | difference between malloc and calloc and realloc
malloc vs calloc | calloc vs malloc in c | malloc vs calloc vs realloc | free() in c | why malloc is faster than calloc | calloc hair | man calloc | difference between malloc and calloc and realloc
malloc vs calloc | calloc vs malloc in c | malloc vs calloc vs realloc | free() in c | why malloc is faster than calloc | calloc hair | man calloc | difference between malloc and calloc and realloc
malloc vs calloc | calloc vs malloc in c | malloc vs calloc vs realloc | free() in c | why malloc is faster than calloc | calloc hair | man calloc | difference between malloc and calloc and realloc
malloc vs calloc | calloc vs malloc in c | malloc vs calloc vs realloc | free() in c | why malloc is faster than calloc | calloc hair | man calloc | difference between malloc and calloc and realloc malloc vs calloc calloc vs malloc in c malloc vs calloc vs realloc free() in c why malloc is faster than calloc calloc hair man calloc difference between malloc and calloc and realloc
Share
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.
#include<stdio.h>
#include<stdlib.h>
int main() {
int* a = (int*) calloc(5, sizeof(int));
return 0;
}