{type} ptr = ({type})calloc(, sizeof({type}));
if (ptr == NULL) {
printf("Memory allocation failed!\n");
exit(0);
}
free(ptr);
Allocate with calloc
Allocate memory using calloc
0 Comments
Add Comment
Log in to add a comment
{type} ptr = ({type})calloc(, sizeof({type}));
if (ptr == NULL) {
printf("Memory allocation failed!\n");
exit(0);
}
free(ptr);
Allocate with calloc
Allocate memory using calloc
Log in to add a comment