函数名: calloc
功  能: 分配主存储器
用  法: void *calloc(size_t nelem, size_t elsize);
程序例:
#include <stdio.h>
#include <alloc.h>
int main(void)
{
   char *str = NULL;
   /* allocate memory for string */
   str = calloc(10, sizeof(char));
   /* copy "Hello" into string */
   strcpy(str, "Hello");
   /* display string */
   printf("String is %s\n", str);
   /* free memory */
   free(str);
   return 0;
}