tst_calloc.c

来自「这是《Keil Cx51 V7.0单片机高级语言编程与uVision2应用实践》」· C语言 代码 · 共 11 行

C
11
字号
#include <stdlib.h>
#include <stdio.h>                  /* for printf */
void tst_calloc (void) {
   int xdata *p;          /* ptr to array of 100 ints */
   p = calloc (100, sizeof (int));
   if (p == NULL)
      printf ("Error allocating array\n");
   else
      printf ("Array address is %p\n", (void *) p);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?